Menu

Commit [r4405]  Maximize  Restore  History

This commit corrects a performance bug that I introduced earlier this

year. It eliminates write lock bracketing around the action performed
withn the method _processAllInCurrentDoc on the document corresponding
to the results collection being processed. I had added the write lock bracketing
to accommodate possible modification of the document. But
processAll (which is the only method that calls
_processAllInCurrentDoc) is only passed commands that do not touch the
corresponding DefintionsDocument. I narrowed the contract accordingly
and dropped the write lock bracketing.

The acquireWriteLock() operation forced the current
openDefinitionsDocument to be realized (constructing the virtualized
DefinitionsDocument embedded within).

The following files were modified, most of them incidentally:

M src/edu/rice/cs/drjava/model/GlobalModelIOTest.java
M src/edu/rice/cs/drjava/model/cache/DocumentCache.java
M src/edu/rice/cs/drjava/model/definitions/DefinitionsDocument.java
M src/edu/rice/cs/drjava/model/AbstractDJDocument.java
M src/edu/rice/cs/drjava/model/FindReplaceMachine.java
M src/edu/rice/cs/drjava/model/AbstractGlobalModel.java
M src/edu/rice/cs/drjava/ui/MainFrame.java
M src/edu/rice/cs/drjava/ui/FindReplacePanel.java
M src/edu/rice/cs/util/text/ConsoleDocument.java
M src/edu/rice/cs/util/text/SwingDocument.java
M src/edu/rice/cs/util/swing/HighlightManager.java

rcartwright 2008-03-15

changed /trunk/drjava/src/edu/rice/cs/drjava/model/AbstractDJDocument.java
changed /trunk/drjava/src/edu/rice/cs/drjava/model/AbstractGlobalModel.java
changed /trunk/drjava/src/edu/rice/cs/drjava/model/FindReplaceMachine.java
changed /trunk/drjava/src/edu/rice/cs/drjava/model/GlobalModelIOTest.java
changed /trunk/drjava/src/edu/rice/cs/drjava/model/cache/DocumentCache.java
changed /trunk/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsDocument.java
changed /trunk/drjava/src/edu/rice/cs/drjava/ui/FindReplacePanel.java
changed /trunk/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java
changed /trunk/drjava/src/edu/rice/cs/util/swing/HighlightManager.java
changed /trunk/drjava/src/edu/rice/cs/util/text/ConsoleDocument.java
changed /trunk/drjava/src/edu/rice/cs/util/text/SwingDocument.java
/trunk/drjava/src/edu/rice/cs/drjava/model/AbstractDJDocument.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/drjava/model/AbstractGlobalModel.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/drjava/model/FindReplaceMachine.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/drjava/model/GlobalModelIOTest.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/drjava/model/cache/DocumentCache.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsDocument.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/drjava/ui/FindReplacePanel.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/util/swing/HighlightManager.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/util/text/ConsoleDocument.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/util/text/SwingDocument.java Diff Switch to side-by-side view
Loading...
MongoDB Logo MongoDB