You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Noble Paul (JIRA)" <ji...@apache.org> on 2010/01/07 06:59:54 UTC
[jira] Created: (SOLR-1707) Use google collections immutable
collections instead of Collections.unmodifiable**
Use google collections immutable collections instead of Collections.unmodifiable**
----------------------------------------------------------------------------------
Key: SOLR-1707
URL: https://issues.apache.org/jira/browse/SOLR-1707
Project: Solr
Issue Type: Improvement
Reporter: Noble Paul
Assignee: Noble Paul
Fix For: 1.5
google collections offer true immutability is more memory efficiency
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-1707) Use google collections immutable
collections instead of Collections.unmodifiable**
Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798592#action_12798592 ]
Noble Paul commented on SOLR-1707:
----------------------------------
yonik, could you share the test code?
> Use google collections immutable collections instead of Collections.unmodifiable**
> ----------------------------------------------------------------------------------
>
> Key: SOLR-1707
> URL: https://issues.apache.org/jira/browse/SOLR-1707
> Project: Solr
> Issue Type: Improvement
> Reporter: Noble Paul
> Assignee: Noble Paul
> Fix For: 1.5
>
> Attachments: SOLR-1707.patch
>
>
> google collections offer true immutability and more memory efficiency
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-1707) Use google collections immutable
collections instead of Collections.unmodifiable**
Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Noble Paul updated SOLR-1707:
-----------------------------
Description: google collections offer true immutability and more memory efficiency (was: google collections offer true immutability is more memory efficiency)
> Use google collections immutable collections instead of Collections.unmodifiable**
> ----------------------------------------------------------------------------------
>
> Key: SOLR-1707
> URL: https://issues.apache.org/jira/browse/SOLR-1707
> Project: Solr
> Issue Type: Improvement
> Reporter: Noble Paul
> Assignee: Noble Paul
> Fix For: 1.5
>
>
> google collections offer true immutability and more memory efficiency
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-1707) Use google collections immutable
collections instead of Collections.unmodifiable**
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797713#action_12797713 ]
Yonik Seeley commented on SOLR-1707:
------------------------------------
OK, I whipped up a quick test with String keys, many small maps (anywhere from 1 to 20 keys per map). Java6 -server 64 bit, Win7_x64
Size:
Collections.unmodifiableMap: 7.4% bigger than HashMap
google immutable map: 22.4% bigger than HashMap
Speed:
Collections.unmodifiableMap: 4.2% slower than HashMap
google immutable map: 26.0% slower than HashMap
For best space and speed, looks like we should stick with straight HashMap.
> Use google collections immutable collections instead of Collections.unmodifiable**
> ----------------------------------------------------------------------------------
>
> Key: SOLR-1707
> URL: https://issues.apache.org/jira/browse/SOLR-1707
> Project: Solr
> Issue Type: Improvement
> Reporter: Noble Paul
> Assignee: Noble Paul
> Fix For: 1.5
>
> Attachments: SOLR-1707.patch
>
>
> google collections offer true immutability and more memory efficiency
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-1707) Use google collections immutable
collections instead of Collections.unmodifiable**
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797687#action_12797687 ]
Yonik Seeley commented on SOLR-1707:
------------------------------------
True immutability? What's that mean over Collections.unmodifiableMap()?
And how do we know these are faster or more memory efficient?
> Use google collections immutable collections instead of Collections.unmodifiable**
> ----------------------------------------------------------------------------------
>
> Key: SOLR-1707
> URL: https://issues.apache.org/jira/browse/SOLR-1707
> Project: Solr
> Issue Type: Improvement
> Reporter: Noble Paul
> Assignee: Noble Paul
> Fix For: 1.5
>
> Attachments: SOLR-1707.patch
>
>
> google collections offer true immutability and more memory efficiency
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-1707) Use google collections immutable
collections instead of Collections.unmodifiable**
Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Noble Paul updated SOLR-1707:
-----------------------------
Attachment: SOLR-1707.patch
> Use google collections immutable collections instead of Collections.unmodifiable**
> ----------------------------------------------------------------------------------
>
> Key: SOLR-1707
> URL: https://issues.apache.org/jira/browse/SOLR-1707
> Project: Solr
> Issue Type: Improvement
> Reporter: Noble Paul
> Assignee: Noble Paul
> Fix For: 1.5
>
> Attachments: SOLR-1707.patch
>
>
> google collections offer true immutability and more memory efficiency
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-1707) Use google collections immutable
collections instead of Collections.unmodifiable**
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley updated SOLR-1707:
-------------------------------
Attachment: TestPerf.java
Here it is.
To test for size, I cranked up the number of maps to 1M and then put the big sleep at the end of main, then used jconsole (hit GC a bunch of times in a row to see how low you can get the heap).
> Use google collections immutable collections instead of Collections.unmodifiable**
> ----------------------------------------------------------------------------------
>
> Key: SOLR-1707
> URL: https://issues.apache.org/jira/browse/SOLR-1707
> Project: Solr
> Issue Type: Improvement
> Reporter: Noble Paul
> Assignee: Noble Paul
> Fix For: 1.5
>
> Attachments: SOLR-1707.patch, TestPerf.java
>
>
> google collections offer true immutability and more memory efficiency
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-1707) Use google collections immutable
collections instead of Collections.unmodifiable**
Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799084#action_12799084 ]
Noble Paul commented on SOLR-1707:
----------------------------------
The discussion in guva list http://groups.google.com/group/guava-discuss/browse_thread/thread/23bc8fa5ae479698
BTW What are the args passed for the Test
keySize,numKeys, keysPerMap, numMaps, iter ?
> Use google collections immutable collections instead of Collections.unmodifiable**
> ----------------------------------------------------------------------------------
>
> Key: SOLR-1707
> URL: https://issues.apache.org/jira/browse/SOLR-1707
> Project: Solr
> Issue Type: Improvement
> Reporter: Noble Paul
> Assignee: Noble Paul
> Fix For: 1.5
>
> Attachments: SOLR-1707.patch, TestPerf.java
>
>
> google collections offer true immutability and more memory efficiency
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.