tags:

views:

305

answers:

6

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?

+1  A: 

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.

Arnout
A: 

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?

UberJumper
+1  A: 

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.

MSalters
A: 

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...

Andrew Flanagan
Initalization time is dependent on the SDK that is being used, i think C++ is just outdated and broken. ESRI cannot explain why the initalization time is so high on C++ i think its just sloppy coding.
UberJumper
A: 

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.

WaterBoy
A: 

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.

rburhum