This content has been marked as final.
Show 7 replies
-
1. Re: Secondary index over head
robvarga May 21, 2009 12:44 PM (in response to alexey.ragozin)Hi Alexey,
if you internalized the String instances in the value extractor which is used when creating the index, then the number of String instances in the forward map (Binary->String) would be 20k. You woudn't need to change the filtering logic.
Of course this comes at a small performance cost when updating entries and some memory overhead of maintaining the set of internalized String instances in the permanent generation space (and which can possibly cause OutOfMemoryError-s).
Best regards,
Robert -
2. Re: Secondary index over head
alexey.ragozin May 21, 2009 1:13 PM (in response to robvarga)Hi Robert,
Yes I'm aware of such technics. String.intern() is not an option due to performance reason (at least on Sun JVM, it has O(ln(n)) lookup time and O(n) insertion time ). Of cause I can use WeakHashMap to organize own string table.
But I already have this table in first map (String -> Binary), in former project we have used handmade Map implementation with method internKey() to avoid duplication of data.
I'm looking for a way to reuse our old and proven techniques with coherence caches.
Thank you,
Alexey -
3. Re: Secondary index over head
robvarga May 21, 2009 1:44 PM (in response to alexey.ragozin)Hi Alexey,1 person found this helpful
alexey.ragozin wrote:
Unfortunately there is no way the extractor could get hold of the already existing key reference in the reverse index. I agree that the extracted value reference in the reverse index entry (the key from that entry) should be reused by Coherence as the forward index value if the reverse index entry for the same extracted value exists, but apparently it is not.
...
But I already have this table in first map (String -> Binary), in former project we have used handmade Map implementation with method internKey() to avoid duplication of data.
I'm looking for a way to reuse our old and proven techniques with coherence caches.
Thank you,
Alexey
Try to submit an enhancement request for this (and please share the ticket number for it so we can also look for it in the release notes).
Best regards,
Robert -
4. Re: Secondary index over head
339424 May 22, 2009 4:46 PM (in response to robvarga)Hi Alexey, Robert,1 person found this helpful
We've filed COH-2350 to track this enhancement req.
thanks,
-Rob -
5. Re: Secondary index over head
robvarga Jun 6, 2009 5:15 PM (in response to 339424)Hi Rob,
could you also tell us which release is it scheduled for (even if only tentatively)?
Thanks and best regards,
Robert -
6. Re: Secondary index over head
heneman Jun 7, 2009 12:49 AM (in response to robvarga)Hi Robert,
You may want to review the [3.5 Pre-Release Notes|http://coherence.oracle.com/display/COH35UG/Coherence+3.5+Release+Notes].
Regards,
Harv -
7. Re: Secondary index over head
robvarga Jun 7, 2009 9:04 AM (in response to heneman)Wow, that was fast :-)
Thanks and best regards,
Robert