Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 165368 Details for
Bug 305116
[index] Improve performance of indexes results tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Revised Patch
patch.txt (text/plain), 3.76 KB, created by
Satyam Kandula
on 2010-04-20 02:17:30 EDT
(
hide
)
Description:
Revised Patch
Filename:
MIME Type:
Creator:
Satyam Kandula
Created:
2010-04-20 02:17:30 EDT
Size:
3.76 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: search/org/eclipse/jdt/internal/core/index/DiskIndex.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java,v >retrieving revision 1.69 >diff -u -r1.69 DiskIndex.java >--- search/org/eclipse/jdt/internal/core/index/DiskIndex.java 9 Mar 2010 05:55:04 -0000 1.69 >+++ search/org/eclipse/jdt/internal/core/index/DiskIndex.java 20 Apr 2010 06:14:38 -0000 >@@ -132,11 +132,11 @@ > } > return results; > } >-private HashtableOfObject addQueryResult(HashtableOfObject results, char[] word, CategoryTable wordsToDocNumbers, MemoryIndex memoryIndex) throws IOException { >+private HashtableOfObject addQueryResult(HashtableOfObject results, char[] word, CategoryTable wordsToDocNumbers, MemoryIndex memoryIndex, boolean prevResults) throws IOException { > // must skip over documents which have been added/changed/deleted in the memory index > if (results == null) > results = new HashtableOfObject(13); >- EntryResult result = (EntryResult) results.get(word); >+ EntryResult result = prevResults ? (EntryResult) results.get(word) : null; > if (memoryIndex == null) { > if (result == null) > results.putUnsafely(word, new EntryResult(word, wordsToDocNumbers)); >@@ -161,6 +161,10 @@ > if (this.categoryOffsets == null) return null; // file is empty > > HashtableOfObject results = null; // initialized if needed >+ >+ // No need to check the results table for duplicacy while processing the >+ // first category table or if the first category tables doesn't have any results. >+ boolean prevResults = false; > if (key == null) { > for (int i = 0, l = categories.length; i < l; i++) { > CategoryTable wordsToDocNumbers = readCategoryTable(categories[i], true); // cache if key is null since its a definite match >@@ -170,8 +174,9 @@ > results = new HashtableOfObject(wordsToDocNumbers.elementSize); > for (int j = 0, m = words.length; j < m; j++) > if (words[j] != null) >- results = addQueryResult(results, words[j], wordsToDocNumbers, memoryIndex); >+ results = addQueryResult(results, words[j], wordsToDocNumbers, memoryIndex, prevResults); > } >+ prevResults = results != null; > } > if (results != null && this.cachedChunks == null) > cacheDocumentNames(); >@@ -181,7 +186,8 @@ > for (int i = 0, l = categories.length; i < l; i++) { > CategoryTable wordsToDocNumbers = readCategoryTable(categories[i], false); > if (wordsToDocNumbers != null && wordsToDocNumbers.containsKey(key)) >- results = addQueryResult(results, key, wordsToDocNumbers, memoryIndex); >+ results = addQueryResult(results, key, wordsToDocNumbers, memoryIndex, prevResults); >+ prevResults = results != null; > } > break; > case SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE: >@@ -192,9 +198,10 @@ > for (int j = 0, m = words.length; j < m; j++) { > char[] word = words[j]; > if (word != null && key[0] == word[0] && CharOperation.prefixEquals(key, word)) >- results = addQueryResult(results, word, wordsToDocNumbers, memoryIndex); >+ results = addQueryResult(results, word, wordsToDocNumbers, memoryIndex, prevResults); > } > } >+ prevResults = results != null; > } > break; > default: >@@ -205,9 +212,10 @@ > for (int j = 0, m = words.length; j < m; j++) { > char[] word = words[j]; > if (word != null && Index.isMatch(key, word, matchRule)) >- results = addQueryResult(results, word, wordsToDocNumbers, memoryIndex); >+ results = addQueryResult(results, word, wordsToDocNumbers, memoryIndex, prevResults); > } > } >+ prevResults = results != null; > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
frederic_fusier
:
iplog+
frederic_fusier
:
review+
Actions:
View
|
Diff
Attachments on
bug 305116
:
164936
|
165230
| 165368