Andrea Aime wrote:
> Justin Deoliveira ha scritto:
>>
>> Andrea Aime wrote:
> 
>> Yes, this has been an issue i have been thinking about for a while now. 
>> What I am thinking is instead of caching schemas ( which is a 
>> possibility ), to just make them singletons. Since the schema never 
>> really changes after being parsed there is no benefit to keeping private 
>> copies around. I have opened a jira for this.
>>
>> http://jira.codehaus.org/browse/GEOT-1201
> 
> Yeah, thought about this too. I have a couple of concerns with this 
> approach:
> * how much memory gets used for it? What if the application does not
>    need the schemas for a relatively long time
> * what about dynamic schemas such as the feature tyep ones? In Geoserver
>    we could have potentially thousands, I think caching them may provide
>    a good speedup, but at the same time we don't want to keep them
>    around too long. I guess some time to live information should be
>    attached to schemas.
Don't have any hard numbers about how much memory the schema takes up. I 
would imagine its a large amount relative to other objects. I would be 
tempted to stick with a simple singleton for now, profile to see how 
much memory the schema is taking up. If it is significant then perhaps 
we can look at using a soft or weak reference, or some sort of timed 
caching system.

The wfs schema in geoserver is kind of a special case as the base wfs 
schema gets modified as application schema feature types are added. I 
dont particularity like this approach as the wfs schema gets changed and 
this could potentially throw other things off. I think a better solution 
would be to create a different schema object specifically for the 
particular application schema, which simply imports the wfs schema.

-Justin

> 
> Cheers
> Andrea
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
> 
> !DSPAM:4007,45fd9e2d83081702038478!
> 


-- 
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to