初始化 ArcEngine,使其更快?

发布于 2024-07-09 12:44:05 字数 245 浏览 3 评论 0原文

我目前正在使用 ArcEngine(来自 ESRI)开发 C++/COM 项目。 除了文档方面几乎没有支持(SDK 就在那里)这一事实之外,我想知道这里是否有人有过使 ArcEngine 的初始化过程更快的经验。 目前仅初始化引擎就需要 30-35 秒。 现在我们将运行其中几个应用程序。 有人对这个有经验么?

这是一项非常奇怪的任务,但 ESRI 的开发者论坛没有帮助。 我在谷歌上找不到任何东西。

有任何想法吗?

I am currently working on a C++/COM project using ArcEngine(From ESRI). Aside from the fact that there is little to no support in terms of documentation (SDK is there.) Anyways, i am wondering if anyone here has had any experience in making the initialization process of ArcEngine faster. Right now it takes 30-35 seconds just to initialize the engine. Now we are going to be running several of these applications. Does anyone have any experience, with this?

Its a very werid and odd task, but ESRI's developer forums are no help. and i couldnt find anything on google.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

抽个烟儿 2024-07-16 12:44:05

自从我上次使用 ESRI 的东西以来已经有近十年了,所以我无法为您提供有关 ArcEngine 的任何具体信息。

也许你可以池化实例? 在最好的情况下,您将能够重用 ArcEngine 实例,并且可以在使用完毕后将实例返回到池中。
如果这是不可能的,您至少可以尝试让许多实例准备好滚动,尽管这是否可能和/或有用在很大程度上取决于您的应用程序的具体情况。

It's been almost a decade since I last played with ESRI stuff, so I can't help you with anything specific to ArcEngine.

Maybe you can pool instances? In the best case scenario you would be able to reuse ArcEngine instances, and could return an instance back to pool after you're done with it.
If that's not possible, you could at least try to have a number of instances ready to roll, although whether that is possible and/or useful depends a lot on the specifics of your app.

烟雨扶苏 2024-07-16 12:44:05

真的是COM吗? 在这种情况下,ArcEngine 将公开一组 COM 接口。 COM 接口并不神奇,也不是唯一地绑定到一个程序。 事实上,COM 明确支持代理。 例如,这由 DCOM 使用; 您将获得远程服务器的本地代理。

在这种情况下,应该可以编写一个自定义 COM 代理来伪造初始化内容,但转发其他所有内容。 对于您的客户端,代理 COM 接口除了速度更快之外是相同的。 对于 ArcEngine,您的代理可以在调用之间等待很长时间。

Is it really COM? In that case, the ArcEngine will be exposing a set of COM interfaces. COM interfaces are not magic, and not uniquely bound to one program. In fact, COM has explicit support for proxying. This is e.g. used by DCOM; you get a local proxy for the remote server.

In this case, it should be possible to write a custom COM proxy that fakes the initialization stuff but forwards everything else. Towards your client, the proxies COM interface is identical except faster. Towards ArcEngine, your proxy can wait quite long between calls.

抹茶夏天i‖ 2024-07-16 12:44:05

我发现,对于让 ESRI 产品更快启动(不一定是 ArcEngine,但这可能适用)很有用,那就是在定义许可证服务器的注册表中指定端口号(通常为 27004)。

HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\License\LICENSE_SERVER
HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcInfo\Workstation\8.0\LICENSE_SERVER

当您在安装中或通过桌面管理员设置此项时,它通常类似于:@yourserver.name
将其更改为 [email protected]

这可能无法解决您的问题,但是如果你不这样做,值得一试。 我发现它可以加快我们环境中的速度,既使用网络上的许可证管理器,又使用本地计算机上的硬件加密狗。

Something that I have found useful with getting ESRI products to start faster (not necessarily ArcEngine, but this probably applies) is to specify the port number (generally 27004) in the registry where the license server is defined.

HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\License\LICENSE_SERVER
HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcInfo\Workstation\8.0\LICENSE_SERVER

When you set this in installation or through the desktop administrator, it is generally something like: @yourserver.name
Change this to [email protected]

Again this may not solve your issue, but if you're not doing it, it's worth a try. I've found it to speed things up in our environment, both using a license manager on a network and with a hardware dongle on the local machine.

过期情话 2024-07-16 12:44:05

那么从我的理解ArcEngine初始化,初始化一个特殊的COM环境。

您永远无法对初始化的环境进行任何类型的真正处理。 您能以某种方式存储 COM 环境并将其传递给其他程序吗? 我当前的想法是:

Windows服务在初始化的ArcEngine的后台运行。 程序以某种方式查询服务,服务返回 COM 环境。 这可能吗?

Well from my understanding ArcEngine initialization, initializes a special COM environment.

You don't ever get any sort of real handle over the initialized environment. Can you somehow store a COM Enviroment and pass it to other programs. My current idea is:

Windows Service Running in Background with initialized ArcEngine. Program somehow queries the service, the service returns the COM Enviroment. Is this even possible?

忘东忘西忘不掉你 2024-07-16 12:44:05

ESRI 论坛提供的帮助很少,对此我感到非常悲伤。 感觉 Arc* 开发人员很大程度上是靠自己。

使用 ArcEngine + .Net,应用程序的初始化时间在我们的环境中微不足道(也许 1 秒?)——您使用的是缓慢的远程服务器还是这只是没有加载网络或地图的引擎?

每当我必须处理大型数据集时,ESRI 都会有一只猪。

很高兴看到一些关于 ESRI 产品 SO 的讨论! 这里还没有很多...

I had a lot of grief with ESRI forums providing very little help. It feels like Arc* developers are largely on their own.

Using ArcEngine + .Net the initialization time for an application has been trivial (maybe 1 second?) in our environment -- are you using a slow remote server or is this JUST the engine with no network or maps being loaded?

Whenever I've had to deal with large data sets, ESRI has a pig though.

Good to see some discussion on SO of ESRI products! Not a lot here yet...

暮光沉寂 2024-07-16 12:44:05

到底哪条线需要 45 秒? 如果我必须进行一些心理调试,我猜您的许可证服务器遇到了问题。

首先检查一下。

Exactly what line is taking 45 seconds? If I had to do some psychic debugging, I would guess that you are running into a problem with your license server.

Check that first.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文