From f6b6b2c59c53e070520c923399fe3f0697cfb302 Mon Sep 17 00:00:00 2001 From: Alexey Gopachenko Date: Mon, 11 Feb 2013 15:17:50 +0100 Subject: [PATCH] Spellchecker IDEA-100509 slow on large files / minor - DTO List is often empty. --- .../com/intellij/spellchecker/inspections/BaseSplitter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/spellchecker/src/com/intellij/spellchecker/inspections/BaseSplitter.java b/plugins/spellchecker/src/com/intellij/spellchecker/inspections/BaseSplitter.java index 013b6a43b161..1fa96afac5a2 100644 --- a/plugins/spellchecker/src/com/intellij/spellchecker/inspections/BaseSplitter.java +++ b/plugins/spellchecker/src/com/intellij/spellchecker/inspections/BaseSplitter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,12 +21,12 @@ import com.intellij.openapi.progress.ProgressIndicatorProvider; import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.Consumer; +import com.intellij.util.SmartList; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.text.CharacterIterator; import java.text.StringCharacterIterator; -import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.regex.Matcher; @@ -96,7 +96,7 @@ public abstract class BaseSplitter implements Splitter { @NotNull static protected List excludeByPattern(String text, TextRange range, @NotNull Pattern toExclude, int groupToInclude) { - List toCheck = new ArrayList(); + List toCheck = new SmartList(); int from = range.getStartOffset(); int till; boolean addLast = true;