Rickard Öberg schrieb:
On 8/2/11 01:34 , Falko Bräutigam wrote:
Say displaying a list of spatial features as the result of an query
(maybe a bounding box) in a GIS app. The user selects the rectangle of
the bbox, the result gets displayed in a table. The user then sorts the
table for one column, picks an entity, opens an editor...

If we could get the Query API to return Values instead of Entities, I think things like that could be way way more efficient.

Hmm... honestly I don't get the idea. I have to learn more about that. Any pointers for me to read?

Unfortunatelly sorting in the backend is not an option because most
properties are computed. So IFAIS I need to fetch all entities to sort
them. Just a few entities are used afterwards to display the visible
lines of the table. Almost all entities are probably never used again.
The cool thing with the soft references is that, *if* the user makes
some more selection and/or sorting, then all this is very fast as long
as there is enough memory to hold all the entities.

SoftReferences are evil. They *sound* good on JavaDoc, but in practice they bite back because of how they impact the GC. A manual LRU is better, it turns out. All JVM people I've talked to say to avoid SoftReferences, and it's been my experience as well.

Wow! But how to implement an efficient cache if SoftReference is evil then??? Manual LRU? Ok, great. But when to check/run it??? Are there differences between Weak and SoftReferences in this regard?

Rickard, thanks for your response and help.

-Falko
--
Polymap GmbH
Industriestr. 85-95, 04229 Leipzig
Geschäftsführer: Falko Bräutigam
HRB 23133 (Amtsgericht Leipzig)
UST-IdNr.: gemäß § 27 a Umsatzsteuergesetz: DE253001307
Kammerzugehörigkeit: IHK zu Leipzig, IHK zu Rostock
--
Falko Bräutigam
http://polymap.org

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to