Hi Andrea
What profiling tool do you use ?. Would make sense if I use it too.
Cheers
Chrilstian
On Mon, Apr 20, 2015 at 3:06 PM, Christian Mueller <
[email protected]> wrote:
> Hi Andrea
>
> Would be a good idea to have a migrated security configuration on master,
> 2.7.x and 2.6.x. I think we can use the identical configuration on each
> branch.
>
> I have no idea about the HelperBase class, I think it was introduced by
> Mauro or Justin.
>
> Cheers
> Christian
>
>
>
> On Sun, Apr 19, 2015 at 4:29 PM, Andrea Aime <[email protected]
> > wrote:
>
>> Hi,
>> I've been spending some time looking as to why our tests are so slow, so
>> I've profiled
>> a WFS surefire process while it was running our tests.
>>
>> Here is a breakdown from the main method:
>>
>> root) org.apache.maven.surefire.booter.ForkedBooter.main(String[]) 94094 0
>> ...
>> setup) org.geoserver.test.GeoServerBaseTestSupport.doSetup() 49714 0
>> test-methods) sun.reflect.NativeMethodAccessorImpl.invoke0(Method,
>> Object, Object[]) 35130 0
>>
>> The test-methods root contains all the single test methods runs, e.g.:
>> * org.geoserver.wfs.ExternalEntitiesTest.testWfs1_1() 932 0
>> * org.geoserver.wfs.AliasTest.testAliasFifteen() 856 0
>> * org.geoserver.wfs.GetFeaturePagingTest.testStartIndexMultipleTypesPOST()
>> 755 0
>> * org.geoserver.wfs.GetFeaturePagingTest.testStartIndexMultipleTypes()
>> 584 0
>>
>> and so on
>>
>> So... we are spending 53% of our build time running the various setups...
>> not nice.
>> And here is how the doSetup breaks down:
>>
>>
>>
>> So, we are spending 32% of our overall build time running security
>> subsystem data directory migrations...
>> that really needs to be fixed, I believe, it's pretty much the same time
>> we spend actually running
>> test methods...
>>
>> I guess the best approach would be to make sure that we generate the
>> security subsystem config
>> already at the latest version required.
>> But, there is something else going on here, those migration result in a
>> insane amount of calls to
>> the GeoServerSecuritManager.persister(), which in turns creates a XStream
>> persister from
>> scratch. Have a look, we call that method 300.000 times during the WFS
>> test build alone:
>>
>>
>> I believe there is something fishy going on there, like, I see the
>> HelperBase.loadConfig class
>> called over and over loading the same files, I'm afraid there might be
>> some sort of event escalation
>> (like, changing one of the security config files, which results in the
>> whole security being reloaded,
>> then change another, and so on).
>>
>> The code seems in need of a refactor, where a single persister is reused
>> for all the migration operations.
>>
>> Christian, do you have some time to look into this issue? By comparisong,
>> loading the catalog
>> from the many little config files takes only 3 seconds overall, that is,
>> 1/10th of the time we spend
>> doing these migrations.
>>
>> Cheers
>> Andrea
>>
>>
>> --
>> ==
>> GeoServer Professional Services from the experts! Visit
>> http://goo.gl/NWWaa2 for more information.
>> ==
>>
>> Ing. Andrea Aime
>> @geowolf
>> Technical Lead
>>
>> GeoSolutions S.A.S.
>> Via Poggio alle Viti 1187
>> 55054 Massarosa (LU)
>> Italy
>> phone: +39 0584 962313
>> fax: +39 0584 1660272
>> mob: +39 339 8844549
>>
>> http://www.geo-solutions.it
>> http://twitter.com/geosolutions_it
>>
>> *AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
>>
>> Le informazioni contenute in questo messaggio di posta elettronica e/o
>> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
>> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
>> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
>> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
>> darcene notizia via e-mail e di procedere alla distruzione del messaggio
>> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
>> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
>> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
>> principi dettati dal D.Lgs. 196/2003.
>>
>>
>>
>> The information in this message and/or attachments, is intended solely
>> for the attention and use of the named addressee(s) and may be confidential
>> or proprietary in nature or covered by the provisions of privacy act
>> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
>> Code).Any use not in accord with its purpose, any disclosure, reproduction,
>> copying, distribution, or either dissemination, either whole or partial, is
>> strictly forbidden except previous formal approval of the named
>> addressee(s). If you are not the intended recipient, please contact
>> immediately the sender by telephone, fax or e-mail and delete the
>> information in this message that has been received in error. The sender
>> does not give any warranty or accept liability as the content, accuracy or
>> completeness of sent messages and accepts no responsibility for changes
>> made after they were sent or for other risks which arise as a result of
>> e-mail transmission, viruses, etc.
>>
>> -------------------------------------------------------
>>
>
>
>
> --
> DI Christian Mueller MSc (GIS), MSc (IT-Security)
> OSS Open Source Solutions GmbH
>
>
--
DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel