[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Mark Miller (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700593#action_12700593 ] Mark Miller commented on LUCENE-1607: - What was the field count? Is it still a conside

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Yonik Seeley (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700599#action_12700599 ] Yonik Seeley commented on LUCENE-1607: -- Earwin, I took a quick look at your implement

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Mark Miller (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700600#action_12700600 ] Mark Miller commented on LUCENE-1607: - bq. Earwin, I took a quick look at your impleme

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Earwin Burrfoot (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700601#action_12700601 ] Earwin Burrfoot commented on LUCENE-1607: - bq. This default would be more back com

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Earwin Burrfoot (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700604#action_12700604 ] Earwin Burrfoot commented on LUCENE-1607: - bq. What was the field count? Is it sti

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Yonik Seeley (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700618#action_12700618 ] Yonik Seeley commented on LUCENE-1607: -- The thread safety problem has to do with safe

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Derek DeMarco (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700629#action_12700629 ] Derek DeMarco commented on LUCENE-1607: --- Good point Yonik. Making pool volatile sho

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-20 Thread Earwin Burrfoot (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700696#action_12700696 ] Earwin Burrfoot commented on LUCENE-1607: - Okay, you're probably right. It's not t

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-20 Thread Mark Miller (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700784#action_12700784 ] Mark Miller commented on LUCENE-1607: - bq. The thread safety problem has to do with sa

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-20 Thread Yonik Seeley (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700827#action_12700827 ] Yonik Seeley commented on LUCENE-1607: -- bq. lack of collision resolve My version was

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-20 Thread Earwin Burrfoot (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700928#action_12700928 ] Earwin Burrfoot commented on LUCENE-1607: - Hehe, ten minute difference. Take over

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-20 Thread Yonik Seeley (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700931#action_12700931 ] Yonik Seeley commented on LUCENE-1607: -- bq. The fastest hash we can get, should have

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-20 Thread Earwin Burrfoot (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700935#action_12700935 ] Earwin Burrfoot commented on LUCENE-1607: - bq. Collisions should also be very quic

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-20 Thread Yonik Seeley (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700942#action_12700942 ] Yonik Seeley commented on LUCENE-1607: -- bq. In no-collision resolution scheme, if you

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-22 Thread Earwin Burrfoot (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701626#action_12701626 ] Earwin Burrfoot commented on LUCENE-1607: - I tried it out. Works a little bit bett

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-29 Thread Earwin Burrfoot (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704225#action_12704225 ] Earwin Burrfoot commented on LUCENE-1607: - Mmm.. what's the status of this one? Sh

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-29 Thread Patrick Eger (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704246#action_12704246 ] Patrick Eger commented on LUCENE-1607: -- As a quick comment on the implementation, i n

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-29 Thread Yonik Seeley (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704247#action_12704247 ] Yonik Seeley commented on LUCENE-1607: -- bq. why h >> 7? Was copied from Solr's hashi

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-29 Thread Yonik Seeley (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704252#action_12704252 ] Yonik Seeley commented on LUCENE-1607: -- bq. As a quick comment on the implementation,

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-29 Thread Patrick Eger (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704261#action_12704261 ] Patrick Eger commented on LUCENE-1607: -- Ah I see thanks. Was looking at the most rece

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-29 Thread Yonik Seeley (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704306#action_12704306 ] Yonik Seeley commented on LUCENE-1607: -- The last patch removed the ability to plug a

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-29 Thread Earwin Burrfoot (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704313#action_12704313 ] Earwin Burrfoot commented on LUCENE-1607: - Is there 'any' benefit of dumping Strin

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-29 Thread Earwin Burrfoot (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704315#action_12704315 ] Earwin Burrfoot commented on LUCENE-1607: - A top bound on cache size will do? If y

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-29 Thread Shalin Shekhar Mangar (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704484#action_12704484 ] Shalin Shekhar Mangar commented on LUCENE-1607: --- Yonik, the string is being

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-05-05 Thread Earwin Burrfoot (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706129#action_12706129 ] Earwin Burrfoot commented on LUCENE-1607: - Bug in previous algo (unbounded hash):

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-06-10 Thread Michael McCandless (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718181#action_12718181 ] Michael McCandless commented on LUCENE-1607: Yonik is this ready to go in...?

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-06-10 Thread Yonik Seeley (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718188#action_12718188 ] Yonik Seeley commented on LUCENE-1607: -- I think so... but I was waiting for some kind

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-06-10 Thread Earwin Burrfoot (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718198#action_12718198 ] Earwin Burrfoot commented on LUCENE-1607: - bq. but I was waiting for some kind of

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-06-11 Thread Yonik Seeley (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718650#action_12718650 ] Yonik Seeley commented on LUCENE-1607: -- bq. I still have a feeling we should expose a

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-06-16 Thread Mark Miller (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720266#action_12720266 ] Mark Miller commented on LUCENE-1607: - I assume we can assign this one to you Yonik?

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-06-16 Thread Yonik Seeley (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720274#action_12720274 ] Yonik Seeley commented on LUCENE-1607: -- I've held off because of a lack of consensus,

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-06-16 Thread Michael McCandless (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720291#action_12720291 ] Michael McCandless commented on LUCENE-1607: bq. I've held off because of a la

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-06-23 Thread Earwin Burrfoot (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723352#action_12723352 ] Earwin Burrfoot commented on LUCENE-1607: - Okay, let's have an extra class and abi

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-07-14 Thread Mark Miller (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731185#action_12731185 ] Mark Miller commented on LUCENE-1607: - looks like this is so close ... > String.inter

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-08-05 Thread Yonik Seeley (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739628#action_12739628 ] Yonik Seeley commented on LUCENE-1607: -- bq. Except I'd like the javadoc demand each i

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-08-07 Thread Uwe Schindler (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740638#action_12740638 ] Uwe Schindler commented on LUCENE-1607: --- Committed rev 802095. > String.intern() fa

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-08-24 Thread Noble Paul (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12746773#action_12746773 ] Noble Paul commented on LUCENE-1607: isn't it possible to make the call to {code} pub

[jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-08-24 Thread Yonik Seeley (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12746845#action_12746845 ] Yonik Seeley commented on LUCENE-1607: -- {quote} isn't it possible to make the call to

Re: [jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Chris Miller
As far as I can see, both these implementations only suffer from threadsafety problems in that they don't guarantee visibility across threads, ie it's possible for threads to see stale data. I don't see any prospect of corruption or race conditions due to out-of-order execution. So the code shou

Re: [jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Earwin Burrfoot
On Sun, Apr 19, 2009 at 23:16, Chris Miller wrote: > As far as I can see, both these implementations only suffer from > threadsafety problems in that they don't guarantee visibility across > threads, ie it's possible for threads to see stale data. > So the code should work fine if you can live wi

Re: [jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Chris Miller
How about benchmarking with eg a ConcurrentHashMap instead? Scratch that, I forgot about the 1.3/1.4 dependency... - To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h.

Re: [jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Chris Miller
As soon as all possible fields are in the pool, we're essentially readonly. The problem is, there's no guarantee we will ever reach this point. For example suppose you have a server app that spawns a new thread per request. Each new thread might have to make all the .intern() calls again becau

Re: [jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Earwin Burrfoot
On Sun, Apr 19, 2009 at 23:42, Chris Miller wrote: >> As soon as all possible fields are in the pool, we're essentially >> readonly. > The problem is, there's no guarantee we will ever reach this point. For > example suppose you have a server app that spawns a new thread per request. > Each new th

Re: [jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Chris Miller
Sorry I wasn't as clear as I could have been - I realise JEE servers use a threadpool for handling requests, I was thinking of many other applications in the real world I'm aware of that don't (be that good design or otherwise...). I'm not sure I follow you though when you say "it won't even do

Re: [jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Earwin Burrfoot
> Sorry I wasn't as clear as I could have been - I realise JEE servers use a > threadpool for handling requests, I was thinking of many other applications > in the real world I'm aware of that don't (be that good design or > otherwise...). You was. I just wanted to point out that in real apps you'r

Re: [jira] Commented: (LUCENE-1607) String.intern() faster alternative

2009-04-19 Thread Chris Miller
You was. I just wanted to point out that in real apps you're not going to see stale data longer than for milliseconds Agreed, which is why this whole discussion is very theoretical anyway :) On cache miss, I re-retrieve pool reference after a lock (HashMap is no longer stale), re-read a string