Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2008-04-29 14:27:28 -0400
committerChris Goldthorpe2008-04-29 14:27:28 -0400
commit635596eece1bb662806f6c85334c477ff27523cf (patch)
tree59d31d08f397b616472c45dc9c8c0a29292d0836 /org.eclipse.help
parent2338dfafd7fce35f626a1b764c60ee301724e12a (diff)
downloadeclipse.platform.ua-635596eece1bb662806f6c85334c477ff27523cf.tar.gz
eclipse.platform.ua-635596eece1bb662806f6c85334c477ff27523cf.tar.xz
eclipse.platform.ua-635596eece1bb662806f6c85334c477ff27523cf.zip
Bug 229425 – [Help] Unnecessary code in org.eclipse.help.internal.toc.TocManager.filterTocContributions() wastes CPU cycles
Diffstat (limited to 'org.eclipse.help')
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/toc/Toc.java2
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java8
2 files changed, 1 insertions, 9 deletions
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/toc/Toc.java b/org.eclipse.help/src/org/eclipse/help/internal/toc/Toc.java
index 5500cd932..7a29f14e6 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/toc/Toc.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/toc/Toc.java
@@ -87,7 +87,7 @@ public class Toc extends UAElement implements IToc {
/*
* Returns a mapping of all topic hrefs to ITopics.
*/
- public Map getHref2TopicMap() {
+ private Map getHref2TopicMap() {
if (href2TopicMap == null) {
href2TopicMap = createHref2TopicMap();
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java
index 7059d58f1..e48f7f431 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java
@@ -279,18 +279,10 @@ public class TocManager {
*/
private TocContribution[] filterTocContributions(TocContribution[] unfiltered, Set tocsToFilter) {
List filtered = new ArrayList();
- Set ignoredHrefs = new HashSet();
- Set notIgnoredHrefs = new HashSet();
for (int i=0;i<unfiltered.length;++i) {
- Toc toc = (Toc)unfiltered[i].getToc();
- Set hrefs = toc.getHref2TopicMap().keySet();
if (!tocsToFilter.contains(unfiltered[i].getId()) &&
!tocsToFilter.contains(unfiltered[i].getCategoryId())) {
filtered.add(unfiltered[i]);
- notIgnoredHrefs.addAll(hrefs);
- }
- else {
- ignoredHrefs.addAll(hrefs);
}
}
return (TocContribution[])filtered.toArray(new TocContribution[filtered.size()]);

Back to the top