You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2010/10/21 20:04:15 UTC
[jira] Created: (LUCENE-2716) Improve automaton's
MinimizeOperations.minimizeHopcroft() to not create so many objects
Improve automaton's MinimizeOperations.minimizeHopcroft() to not create so many objects
---------------------------------------------------------------------------------------
Key: LUCENE-2716
URL: https://issues.apache.org/jira/browse/LUCENE-2716
Project: Lucene - Java
Issue Type: Improvement
Affects Versions: 4.0
Reporter: Uwe Schindler
Assignee: Uwe Schindler
Priority: Minor
Fix For: 4.0
MinimizeOperations.minimizeHopcroft() creates a lot of objects because of strange arrays and useless ArrayLists with fixed length. E.g. it created List<List<List<>>>. This patch minimizes this and makes the whole method much more GC friendler by using simple arrays or avoiding empty LinkedLists at all (inside reverse array).
minimize() is called very very often, especially in tests (MockAnalyzer).
A test for the method is prepared by Robert, we found a bug somewhere else in automaton, so this is pending until his issue and fix arrives.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] Commented: (LUCENE-2716) Improve automaton's
MinimizeOperations.minimizeHopcroft() to not create so many objects
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923550#action_12923550 ]
Uwe Schindler commented on LUCENE-2716:
---------------------------------------
It still creates lots of objects depending on the size and states of the automaton, but a lot less!
If I will look several times over it, I may find more improvements. :-)
The Hopcroft-Policeman
> Improve automaton's MinimizeOperations.minimizeHopcroft() to not create so many objects
> ---------------------------------------------------------------------------------------
>
> Key: LUCENE-2716
> URL: https://issues.apache.org/jira/browse/LUCENE-2716
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Priority: Minor
> Fix For: 4.0
>
> Attachments: LUCENE-2716.patch
>
>
> MinimizeOperations.minimizeHopcroft() creates a lot of objects because of strange arrays and useless ArrayLists with fixed length. E.g. it created List<List<List<>>>. This patch minimizes this and makes the whole method much more GC friendler by using simple arrays or avoiding empty LinkedLists at all (inside reverse array).
> minimize() is called very very often, especially in tests (MockAnalyzer).
> A test for the method is prepared by Robert, we found a bug somewhere else in automaton, so this is pending until his issue and fix arrives.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] Updated: (LUCENE-2716) Improve automaton's
MinimizeOperations.minimizeHopcroft() to not create so many objects
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-2716:
----------------------------------
Attachment: LUCENE-2716.patch
Final patch, will commit now.
> Improve automaton's MinimizeOperations.minimizeHopcroft() to not create so many objects
> ---------------------------------------------------------------------------------------
>
> Key: LUCENE-2716
> URL: https://issues.apache.org/jira/browse/LUCENE-2716
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Priority: Minor
> Fix For: 4.0
>
> Attachments: LUCENE-2716.patch, LUCENE-2716.patch
>
>
> MinimizeOperations.minimizeHopcroft() creates a lot of objects because of strange arrays and useless ArrayLists with fixed length. E.g. it created List<List<List<>>>. This patch minimizes this and makes the whole method much more GC friendler by using simple arrays or avoiding empty LinkedLists at all (inside reverse array).
> minimize() is called very very often, especially in tests (MockAnalyzer).
> A test for the method is prepared by Robert, we found a bug somewhere else in automaton, so this is pending until his issue and fix arrives.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] Resolved: (LUCENE-2716) Improve automaton's
MinimizeOperations.minimizeHopcroft() to not create so many objects
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler resolved LUCENE-2716.
-----------------------------------
Resolution: Fixed
Committed revision: 1026168
> Improve automaton's MinimizeOperations.minimizeHopcroft() to not create so many objects
> ---------------------------------------------------------------------------------------
>
> Key: LUCENE-2716
> URL: https://issues.apache.org/jira/browse/LUCENE-2716
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Priority: Minor
> Fix For: 4.0
>
> Attachments: LUCENE-2716.patch, LUCENE-2716.patch
>
>
> MinimizeOperations.minimizeHopcroft() creates a lot of objects because of strange arrays and useless ArrayLists with fixed length. E.g. it created List<List<List<>>>. This patch minimizes this and makes the whole method much more GC friendler by using simple arrays or avoiding empty LinkedLists at all (inside reverse array).
> minimize() is called very very often, especially in tests (MockAnalyzer).
> A test for the method is prepared by Robert, we found a bug somewhere else in automaton, so this is pending until his issue and fix arrives.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] Updated: (LUCENE-2716) Improve automaton's
MinimizeOperations.minimizeHopcroft() to not create so many objects
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-2716:
----------------------------------
Attachment: LUCENE-2716.patch
> Improve automaton's MinimizeOperations.minimizeHopcroft() to not create so many objects
> ---------------------------------------------------------------------------------------
>
> Key: LUCENE-2716
> URL: https://issues.apache.org/jira/browse/LUCENE-2716
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Priority: Minor
> Fix For: 4.0
>
> Attachments: LUCENE-2716.patch
>
>
> MinimizeOperations.minimizeHopcroft() creates a lot of objects because of strange arrays and useless ArrayLists with fixed length. E.g. it created List<List<List<>>>. This patch minimizes this and makes the whole method much more GC friendler by using simple arrays or avoiding empty LinkedLists at all (inside reverse array).
> minimize() is called very very often, especially in tests (MockAnalyzer).
> A test for the method is prepared by Robert, we found a bug somewhere else in automaton, so this is pending until his issue and fix arrives.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] Resolved: (LUCENE-2716) Improve automaton's
MinimizeOperations.minimizeHopcroft() to not create so many objects
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler resolved LUCENE-2716.
-----------------------------------
Resolution: Fixed
Commit standard BitSet variant in revision: 1026190
(OpenBitSet is 64bit and set/get of single bits is ineffective on 32bit machines, no need for bulk transformations)
> Improve automaton's MinimizeOperations.minimizeHopcroft() to not create so many objects
> ---------------------------------------------------------------------------------------
>
> Key: LUCENE-2716
> URL: https://issues.apache.org/jira/browse/LUCENE-2716
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Priority: Minor
> Fix For: 4.0
>
> Attachments: LUCENE-2716-2(OpenBitSet).patch, LUCENE-2716-2.patch, LUCENE-2716.patch, LUCENE-2716.patch
>
>
> MinimizeOperations.minimizeHopcroft() creates a lot of objects because of strange arrays and useless ArrayLists with fixed length. E.g. it created List<List<List<>>>. This patch minimizes this and makes the whole method much more GC friendler by using simple arrays or avoiding empty LinkedLists at all (inside reverse array).
> minimize() is called very very often, especially in tests (MockAnalyzer).
> A test for the method is prepared by Robert, we found a bug somewhere else in automaton, so this is pending until his issue and fix arrives.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] Commented: (LUCENE-2716) Improve automaton's
MinimizeOperations.minimizeHopcroft() to not create so many objects
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923552#action_12923552 ]
Robert Muir commented on LUCENE-2716:
-------------------------------------
This thing will make your head explode, thanks for cleaning it up!
> Improve automaton's MinimizeOperations.minimizeHopcroft() to not create so many objects
> ---------------------------------------------------------------------------------------
>
> Key: LUCENE-2716
> URL: https://issues.apache.org/jira/browse/LUCENE-2716
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Priority: Minor
> Fix For: 4.0
>
> Attachments: LUCENE-2716.patch
>
>
> MinimizeOperations.minimizeHopcroft() creates a lot of objects because of strange arrays and useless ArrayLists with fixed length. E.g. it created List<List<List<>>>. This patch minimizes this and makes the whole method much more GC friendler by using simple arrays or avoiding empty LinkedLists at all (inside reverse array).
> minimize() is called very very often, especially in tests (MockAnalyzer).
> A test for the method is prepared by Robert, we found a bug somewhere else in automaton, so this is pending until his issue and fix arrives.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] Updated: (LUCENE-2716) Improve automaton's
MinimizeOperations.minimizeHopcroft() to not create so many objects
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-2716:
----------------------------------
Attachment: LUCENE-2716-2.patch
> Improve automaton's MinimizeOperations.minimizeHopcroft() to not create so many objects
> ---------------------------------------------------------------------------------------
>
> Key: LUCENE-2716
> URL: https://issues.apache.org/jira/browse/LUCENE-2716
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Priority: Minor
> Fix For: 4.0
>
> Attachments: LUCENE-2716-2.patch, LUCENE-2716.patch, LUCENE-2716.patch
>
>
> MinimizeOperations.minimizeHopcroft() creates a lot of objects because of strange arrays and useless ArrayLists with fixed length. E.g. it created List<List<List<>>>. This patch minimizes this and makes the whole method much more GC friendler by using simple arrays or avoiding empty LinkedLists at all (inside reverse array).
> minimize() is called very very often, especially in tests (MockAnalyzer).
> A test for the method is prepared by Robert, we found a bug somewhere else in automaton, so this is pending until his issue and fix arrives.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] Updated: (LUCENE-2716) Improve automaton's
MinimizeOperations.minimizeHopcroft() to not create so many objects
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-2716:
----------------------------------
Attachment: LUCENE-2716-2(OpenBitSet).patch
Same patch with OpenBitSet for comparison
> Improve automaton's MinimizeOperations.minimizeHopcroft() to not create so many objects
> ---------------------------------------------------------------------------------------
>
> Key: LUCENE-2716
> URL: https://issues.apache.org/jira/browse/LUCENE-2716
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Priority: Minor
> Fix For: 4.0
>
> Attachments: LUCENE-2716-2(OpenBitSet).patch, LUCENE-2716-2.patch, LUCENE-2716.patch, LUCENE-2716.patch
>
>
> MinimizeOperations.minimizeHopcroft() creates a lot of objects because of strange arrays and useless ArrayLists with fixed length. E.g. it created List<List<List<>>>. This patch minimizes this and makes the whole method much more GC friendler by using simple arrays or avoiding empty LinkedLists at all (inside reverse array).
> minimize() is called very very often, especially in tests (MockAnalyzer).
> A test for the method is prepared by Robert, we found a bug somewhere else in automaton, so this is pending until his issue and fix arrives.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] Reopened: (LUCENE-2716) Improve automaton's
MinimizeOperations.minimizeHopcroft() to not create so many objects
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler reopened LUCENE-2716:
-----------------------------------
More stuff to optimize, no longer LinkedLists and ArrayLists :-)
Hopcroft Policeman is back!
> Improve automaton's MinimizeOperations.minimizeHopcroft() to not create so many objects
> ---------------------------------------------------------------------------------------
>
> Key: LUCENE-2716
> URL: https://issues.apache.org/jira/browse/LUCENE-2716
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Priority: Minor
> Fix For: 4.0
>
> Attachments: LUCENE-2716-2.patch, LUCENE-2716.patch, LUCENE-2716.patch
>
>
> MinimizeOperations.minimizeHopcroft() creates a lot of objects because of strange arrays and useless ArrayLists with fixed length. E.g. it created List<List<List<>>>. This patch minimizes this and makes the whole method much more GC friendler by using simple arrays or avoiding empty LinkedLists at all (inside reverse array).
> minimize() is called very very often, especially in tests (MockAnalyzer).
> A test for the method is prepared by Robert, we found a bug somewhere else in automaton, so this is pending until his issue and fix arrives.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] Commented: (LUCENE-2716) Improve automaton's
MinimizeOperations.minimizeHopcroft() to not create so many objects
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923572#action_12923572 ]
Robert Muir commented on LUCENE-2716:
-------------------------------------
Ok, I fixed LUCENE-2717 in revision 1026104.
In that issue, I added a basic random test for minimize(), maybe we can improve it, but
it should be pretty good at finding any bugs.
(it doesnt find any bugs with this patch)
> Improve automaton's MinimizeOperations.minimizeHopcroft() to not create so many objects
> ---------------------------------------------------------------------------------------
>
> Key: LUCENE-2716
> URL: https://issues.apache.org/jira/browse/LUCENE-2716
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Priority: Minor
> Fix For: 4.0
>
> Attachments: LUCENE-2716.patch
>
>
> MinimizeOperations.minimizeHopcroft() creates a lot of objects because of strange arrays and useless ArrayLists with fixed length. E.g. it created List<List<List<>>>. This patch minimizes this and makes the whole method much more GC friendler by using simple arrays or avoiding empty LinkedLists at all (inside reverse array).
> minimize() is called very very often, especially in tests (MockAnalyzer).
> A test for the method is prepared by Robert, we found a bug somewhere else in automaton, so this is pending until his issue and fix arrives.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org