[Mapbender-users] GUIs are loading very slowly in Mapbender v2.7.2

Astrid Emde astrid.emde at wheregroup.com
Wed Oct 24 04:55:15 PDT 2012


Hi Verena, hi all,

just two small addition for discussion

1.) It would be nice to know which js-file refers to which application.
We either could log the name to the mb_cache_xxx.log or make the name part
of the js-filename

2.) You create a single cache-logfile for every day (like
mb_cache_2012_10_24.log). What do you think about just one cache file?

Astrid

On Wed, October 24, 2012 11:45 am, Astrid Emde wrote:
> Hello Verena, hello all,
>
>
> Verena - I added your changes to a running Mapbender applications with
> lot of WMS and I have significant faster loading of my application.
>
> So thank you for this solution. All Mapbender applications that handle
> lot of WMS/layers and are loading very slow should implement the changes.
>
> Also we should provide it in the next Mapbender version 2.7.4.
>
>
> I saw that you created the cache directory already.
>
>
> I would suggest to add the mapframe1 element variable loadFromCache to
> every application and set the default to 0. We have to add the SQL to the
> update-Script.
> http://trac.osgeo.org/mapbender/browser/branches/2.7/resources/db/pgsql/U
> TF-8/update/update_2.7.3_to_2.7.4_pgsql_UTF-8.sql
>
>
> We should move your documentation from the mail to the wiki (or js-docu).
>  I added some information to the wiki page already:
> http://www.mapbender.org/Mapframe
>
>
> Best regards Astrid
>
>
> On Mon, October 15, 2012 9:45 am, Verena Diewald wrote:
>
>> Hello list,
>>
>>
>>
>>
>> please try our workaround solution for a faster loading mechanism. What
>>  did we do: We created a kind of cache mechanism which stores the
>> initial js mapobject produced by the WMC loading process. The cache file
>> is being created loading the gui for the first time. As soon as it
>> exists, the gui's mapobject is loaded from the cache file, not again
>> from the WMC process. This makes the loading process faster. Changing
>> the mapobject of the gui (adding WMS, deleting WMS, updating WMS...)
>> deletes the cache file and the gui has to be loaded the slowly way once
>> again for creating a new cache file. Use of the cache file loading
>> process can be controlled using the element var "loadFromCache" of the
>> mapframe1 gui element. This workaround should at least be suitable for
>> all mapbender guis which are not ever-changing (e.g. portal guis). If
>> you want to use the newer GET params api [1] you can not use this
>> woraround. If you want to use the older GET params (e.g. mb_myBBOX,
>> mb_myPOI2SCALE, visiblelayers, querylayers...) you can do this with
>> activated cache solution. What you have to do for integration of the
>> workaround:
>> 1) get all changed files from the Mapbender 2.7 SVN branch of changeset
>> 8491 [2]
>> 2) create a cache directory in the Mapbender's root directory
>> (mapbender/cache) and set the Apache user as owner of this directory
>> 3) add the element var "loadFromCache" to gui element mapframe1 and set
>> it to 1 if you want to use the cache mechanism: INSERT INTO
>> gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context,
>> var_type) VALUES('<gui_id>', 'mapframe1', 'loadFromCache', '1', 'define
>> if mapObj should be loaded from cache if cache file already exists'
>> ,'php_var');
>>
>>
>>
>>
>> Best regards,
>>
>>
>>
>> Verena
>>
>>
>>
>>
>>
>> [1] http://www.mapbender.org/GET-Parameter
>> [2] http://trac.osgeo.org/mapbender/changeset/8491
>>
>>
>>
>>
>>
>> Am 22.08.2012 08:57, schrieb Verena Diewald:
>>
>>
>>> Hi list,
>>>
>>>
>>>
>>> we decided to start another analysis of the performance problem.
>>> Perhaps
>>> it is possible to do a preprocessing of the WMC loading mechanism. We
>>> will think about it. Further ideas are welcome.
>>>
>>>
>>>
>>> Best regards,
>>>
>>>
>>>
>>> Verena
>>>
>>>
>>>
>>>
>>> Am 16.08.2012 16:22, schrieb Verena Diewald:
>>>
>>>
>>>> Hallo Liste,
>>>>
>>>>
>>>>
>>>> Am 16.08.2012 14:47, schrieb Armin Retterath:
>>>>
>>>>
>>>>> Hallo zusammen,
>>>>>
>>>>>
>>>>>
>>>>> es liegt leider nicht an der GUI. Wir müssen etwas am
>>>>> Grundprinzip
>>>>> des Ladens anpassen. Seit der neuen Version dauert es einfach
>>>>> länger. Das aktuelle Verfahren ist bei verteilten Strukturen mit
>>>>>  unterschiedlichen Nutzungsbedingungen leider notwendig und ist
>>>>> durch unsere Weiterentwicklung in den Jahren 2010/2011 dort
>>>>> reingeflossen. Ggf. könnte man optional einen schnelleren
>>>>> Ladevorgang realisieren.
>>>>> Ist aber ein bisschen Programmieraufwand ;-) . Wenn ich nach der
>>>>> Umsetzung der INSPIRE Anforderungen für Downloaddienste was Zeit
>>>>> bekomme, kann ich mich ja mal dransetzen. Problem liegt
>>>>> serverseitig im javascripts/initWmcObj.php Script begründet. Kann
>>>>> man debuggen und dann mal testen wie die Verarbeitungszeit
>>>>> ansteigt, wenn eine GUI immer mehr Dienste hinzubekommt :-( .
>>>>>
>>>>>
>>>> Ich habe mir vor einiger Zeit die Verarbeitungszeiten des WMC im
>>>> Zusammenhang mit ansteigender Anzahl an WMS in einer GUI angeschaut.
>>>>  Es ist leider wirklich so, dass die Erstellung des initialen WMC
>>>> pro hinzukommendem WMS immer länger dauert und sich dadurch die
>>>> Ladezeit
>>>> der GUI immer weiter erhöht.
>>>>
>>>>
>>>> Gruß,
>>>>
>>>>
>>>>
>>>> Verena
>>>>
>>>>
>>>>>
>>>>> Grüße
>>>>> Armin
>>>>>
>>>>>
>>>>>
>>>>> On 16.08.2012 14:38, Thomas Baschetti wrote:
>>>>>
>>>>>
>>>>>> Am 16.08.2012 09:28, schrieb Sebastian Schwarz:
>>>>>>
>>>>>>
>>>>>>> Hallo Liste,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> wir haben ein Problem mit Mapbender v2.7.2: Die GUIs, die wir
>>>>>>>  bislang umgesetzt haben, weisen durchweg sehr lange
>>>>>>> Ladezeiten
>>>>>>> auf, vorallem dann, wenn sie über zahlreiche eingebundene WMS
>>>>>>>  verfügen. Über diesen Effekt haben wir bereits mit der
>>>>>>> WhereGroup gesprochen, die dazu
>>>>>>> folgende Auskunft gab: Beim Laden einer GUI muss das Skript in
>>>>>>>  map.php warten, bis serverseitig aller WMS-Informationen zu
>>>>>>> einem initialen WMC verarbeitet sind, bevor das Skript in die
>>>>>>>  eigentliche GUI springen und diese schließlich anzeigen
>>>>>>> kann. Dieses Laden dauert umso länger, je
>>>>>>> mehr WMS in die GUI eingebunden sind.
>>>>>> ja, das Laden kann mit komplexeren Anwendungen und vielen WMS
>>>>>> leider recht langwierig werden :-(
>>>>>>
>>>>>>> Nun zur eigentlichen Frage: Gibt es eine Möglichkeit, diese
>>>>>>> Ladezeit
>>>>>>> bzw. das serverseitige Verarbeiten der WMS-Informationen zu
>>>>>>> einem initialen WMC zu verkürzen?
>>>>>> als Idee zum Testen: Habt ihr die GUI schon mal manuell als WMC
>>>>>>  Dokument abgespeichert
>>>>>> (modul saveWMC),
>>>>>> und versucht die dann in eine schlanke&schnelle GUI zu laden?
>>>>>> Geht
>>>>>> das dann schnell? Falls ja kann man das sicherlich
>>>>>> automatisieren, aber falls auch das nicht schnell genug ist
>>>>>> müsste man versuchen die Verarbeitung des WMC generell zu
>>>>>> beschleunigen...
>>>>>>
>>>>>> Mit freundlichen Grüßen
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thomas Baschetti
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>> --
>>
>>
>>
>>
>> _______________________________________________
>> Mapbender_users mailing list
>> Mapbender_users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapbender_users
>>
>>
>>
>
>
> --
> Mit freundlichen Grüßen
>
>
> Astrid Emde
>
>
> ********************************************
> Where2B Konferenz 2012
> 13. Dezember 2012 in Bonn
> www.where2b-conference.com
> ********************************************-----------------------------
> -----
>
>
> Astrid Emde
> WhereGroup GmbH & Co.KG
> Eifelstraße 7
> 53119 Bonn
> Germany
>
>
> Fon: +49(0)228 90 90 38 - 19
> Fax: +49(0)228 90 90 38 - 11
>
>
> astrid.emde at wheregroup.com www.wheregroup.com Folgen Sie der WhereGroup auf
> twitter: http://twitter.com/WhereGroup_com
>
>
> Amtsgericht Bonn, HRA 6788
> -------------------------------
> Komplementärin:
> WhereGroup Verwaltungs GmbH
> vertreten durch: Olaf Knopp, Peter Stamm
> -------------------------------
> pgp-public key:
> http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284
> Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen
> Signed and/or encrypted mail is highly appreciated
>
>
>
> _______________________________________________
> Mapbender_users mailing list
> Mapbender_users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_users
>
>


-- 
Mit freundlichen Grüßen

Astrid Emde

********************************************
Where2B Konferenz 2012
13. Dezember 2012 in Bonn
www.where2b-conference.com
********************************************----------------------------------

 Astrid Emde
 WhereGroup GmbH & Co.KG
 Eifelstraße 7
 53119 Bonn
 Germany

 Fon: +49(0)228 90 90 38 - 19
 Fax: +49(0)228 90 90 38 - 11

 astrid.emde at wheregroup.com
 www.wheregroup.com
 Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com

Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------
 pgp-public key:
 http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284
  Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen
  Signed and/or encrypted mail is highly appreciated



More information about the Mapbender_users mailing list