Modify ↓
#23085 closed enhancement (fixed)
[PATCH] Improve speed of selecting large amounts of objects
| Reported by: | Nzara | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | 23.08 |
| Component: | Core | Version: | |
| Keywords: | Cc: |
Description
If you accidentally press Ctrl-A (Select All) after having downloaded a large data set, the system may become unresponsive for a several minutes. This gives you an involuntary coffee break.
A way to cancel a long running operation would be helpful.
Attachments (1)
Change History (5)
by , 2 years ago
| Attachment: | 23085.patch added |
|---|
comment:2 by , 2 years ago
| Summary: | Allow aborting of long running opertions → [PATCH] Allow aborting of long running opertions |
|---|
Notes on the patch:
- Avoid
Streamallocations inConflictCollection.hasConflictForMyby only looking for a conflict if conflicts exist - Avoid many string instantiations in
DefaultNameFormatterby using cached properties - Avoid some
Streamallocations by using standardforloops inDefaultNameFormatter - Use
""to get the component inPrimitiveRenderer.getListCellRendererComponent-- this reduced the memory allocations by ~50% by itself, and appears to have no side-effects. We should ask users on different systems with different UI systems if it works properly. - Significantly reduce cost of
Way.hasOnlyLocatableNodesby using a standardforloop instead of a stream -- this isn't as important for this ticket, but was found while profiling.
comment:4 by , 2 years ago
| Summary: | [PATCH] Allow aborting of long running opertions → [PATCH] Improve speed of selecting large amounts of objects |
|---|
Note:
See TracTickets
for help on using tickets.



Replying to Nzara:
It might be more useful for us to profile the code path and fix that instead.
For this specific case, it looks like it is mostly due to
PrimitiveRenderer.getListCellRendererComponent.Almost all the non-JVM CPU cycles are taken up inside that method by formatting code.
Almost all the memory allocations are done by
PrimitiveRenderer.getListCellRendererComponent. The memory allocations are particularly bad (getListCellRendererComponenttakes ~8 GB of allocations forMesa County, Colorado(my "large" test file)).With that said, doing the same thing multiple times will result in various optimizations from the JVM (this can be really significant; 50s to 30s as an example).
For all I know, it might be doing one of the "easy" optimizations already after the first run.