Commit ff70133
committed
Optimize deleteUrlList by replacing CopyOnWriteArrayList with ArrayList
Changed deleteUrlList from CopyOnWriteArrayList to ArrayList since all access
is already protected by synchronized(indexUpdateCallback) blocks. CopyOnWriteArrayList
creates a copy on every write operation which is unnecessary overhead when synchronization
is already in place.
Changes:
- Replaced CopyOnWriteArrayList with ArrayList for deleteUrlList
- Added synchronized block in commit() method for consistency
- Updated javadoc to clarify synchronization strategy
This improves performance for batch delete operations by eliminating unnecessary
array copying on each URL addition.1 parent 4177e8e commit ff70133
File tree
1 file changed
+9
-5
lines changed- src/main/java/org/codelibs/fess/ds/callback
1 file changed
+9
-5
lines changedLines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
93 | | - | |
94 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
586 | 588 | | |
587 | 589 | | |
588 | 590 | | |
589 | | - | |
590 | | - | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
591 | 595 | | |
592 | 596 | | |
593 | 597 | | |
| |||
0 commit comments