Re: [mapguide-users] 30 seconds delay after creating +/-100 CreateRuntimeMap calls

2017-03-02 Thread BenSav
Guys, Thanks a lot for the explanation! Appears this was the problem indeed. Now, every time the CreateMap function is executed, I capture the returned object to a variable. Then I call Dispose() on it, and the proble is solved. I'll make sure to check the rest of my code on similar issues.

Re: [mapguide-users] 30 seconds delay after creating +/-100 CreateRuntimeMap calls

2017-03-01 Thread Jackie Ng
This is sadly a leaky abstraction that is unavoidable at the moment. You have to be cognizant of the fact that although you're writing .net code, it is .net code that ultimately wraps and interops to native C/C++ code, so its memory management and lifecycle issues can crop up in your .net code

Re: [mapguide-users] 30 seconds delay after creating +/-100 CreateRuntimeMap calls

2017-03-01 Thread Benoit Begin
I do believe you are leaking 1 MgByteReader per call. Here is the definition of the function call: public virtual *MgByteReader* CreateRuntimeMap(MgResourceIdentifier mapDefinition, string sessionId, int requestedFeatures, int iconsPerScaleRange); It returns a MgByteReader. I strongly recommend

Re: [mapguide-users] 30 seconds delay after creating +/-100 CreateRuntimeMap calls

2017-02-28 Thread BenSav
This is the function we are using to create the runtime map, it is called from a for-loop: private void CreateMap(string name, MgMappingService srv) { if (!string.IsNullOrEmpty(name)) { try { _log.Info("Trying to

Re: [mapguide-users] 30 seconds delay after creating +/-100 CreateRuntimeMap calls

2017-02-28 Thread Jackie Ng
If you ran CREATERUNTIMEMAP many times on the same map definition and same set of parameters, the only difference in the responses you get back are the session ids. Thus the caching opportunity is to save the rest of the XML response as a cached "template" and for subsequent requests of the same

Re: [mapguide-users] 30 seconds delay after creating +/-100 CreateRuntimeMap calls

2017-02-28 Thread BenSav
Jackie We are using AIMS 2015 at the moment. I'll post a code snippet of what we are trying to do tomorrow when at the office. Thx! [cid:image004.png@01CE52E4.A7D3CDA0] Ben Savelkoul 0494 64 63 73 | ben.savelk...@geosolutions.be GEO Solutions nv, Prins

Re: [mapguide-users] 30 seconds delay after creating +/-100 CreateRuntimeMap calls

2017-02-28 Thread BenSav
Benoit, Thanks for your comment. In fact we are creating the runtime maps server side sending an array of map definitions in the request as you suggest. Now to reduce the load a little bit, I am only doing this for the maps that are to be visible at startup of the application. When the user

Re: [mapguide-users] 30 seconds delay after creating +/-100 CreateRuntimeMap calls

2017-02-27 Thread Jackie Ng
What is the rough pseudo-code of the thing you are doing ~100 times? I want to try and get a gauge of what server resources could possible be consumed. Also, what version of AIMS/MapGuide is this and what WebTier configuration are you using? - Jackie -- View this message in context:

Re: [mapguide-users] 30 seconds delay after creating +/-100 CreateRuntimeMap calls

2017-02-27 Thread BenSav
Hi Jackie, I do pass the session ID to the CREATERUNTIMEMAP call. I also tried to bump the SessionRepositoriesLimit value, but I've never encountered more than about 20 sessions at a time so that doesn't seem to be the problem. That is about 20 sessions since we haven't gone to production yet.

Re: [mapguide-users] 30 seconds delay after creating +/-100 CreateRuntimeMap calls

2017-02-27 Thread Jackie Ng
CREATERUNTIMEMAP itself will also create a session for you if you do not pass a session id to it. Do you pass the session ID to the CREATERUNTIMEMAP call? If not, that's 2 sessions created for every time you are starting up your viewer. If you are doing 100 calls before seeing a 30s delay,

Re: [mapguide-users] 30 seconds delay after creating +/-100 CreateRuntimeMap calls

2017-02-27 Thread Savelkoul Ben
Hi I am building a Openlayers client for AIMS where at loadtime I call the server api to create a session and to create maps to work with within this session. I use OPERATION=GETDYNAMICMAPOVERLAYIMAGE to call the layers from openlayers. In some cases the number of CreateRuntimeMap calls to the