-
Notifications
You must be signed in to change notification settings - Fork 0
Commits on Mar 22, 2019
-
The startup time of xdu with big du outputs is longer than it needs to be, because the tree is kept sorted while inserting new nodes. Because of the locality of "du", we are likely to get paths with the same prefix in order (e.g. "/a/b/c/x","/a/b/c/y", "/a/b/c"). Each path is split into its components ("a","b",...) and these are seached for in the tree to find the correct parent to insert the new node. This search can greatly be reduced, if we insert new nodes as the first child of the parent, because we are very likely to search for exactly this component when we process the next entry. Always add new nodes as first child of the parent node, sort the tree once after the initial build. Performance comparison ====================== This was done with a relative small data file (144857 lines) and includes just the startup time (xmainloop disabled). Before this commit: 368.781008 task-clock (msec) # 0.728 CPUs utilized 24 context-switches # 0.065 K/sec 1 cpu-migrations # 0.003 K/sec 14561 page-faults # 0.039 M/sec 1345388200 cycles # 3.648 GHz <not supported> stalled-cycles-frontend <not supported> stalled-cycles-backend 2267580465 instructions # 1.69 insns per cycle 527033055 branches # 1429.122 M/sec 1899345 branch-misses # 0.36% of all branches 0.506452004 seconds time elapsed After this commit: 162.493654 task-clock (msec) # 0.546 CPUs utilized 28 context-switches # 0.172 K/sec 0 cpu-migrations # 0.000 K/sec 14567 page-faults # 0.090 M/sec 591784363 cycles # 3.642 GHz <not supported> stalled-cycles-frontend <not supported> stalled-cycles-backend 1155878943 instructions # 1.95 insns per cycle 258056988 branches # 1588.105 M/sec 1570485 branch-misses # 0.61% of all branches 0.297396523 seconds time elapsed
Configuration menu - View commit details
-
Copy full SHA for fa4bd97 - Browse repository at this point
Copy the full SHA fa4bd97View commit details -
Remove obsolete function insertchild
This function has been obsoleted by the previous commit. Remove it.
Configuration menu - View commit details
-
Copy full SHA for 2e074ca - Browse repository at this point
Copy the full SHA 2e074caView commit details -
Declare internal routines as static
Use "static" functions where possible to give the compiler more freedom for optimizations.
Configuration menu - View commit details
-
Copy full SHA for 3a00b22 - Browse repository at this point
Copy the full SHA 3a00b22View commit details -
Revert "Little improvment for repainting"
Revert the timer based redraw prevention, because we want to take a new approach based on an idle worker. This reverts commit 99a44dd.
Configuration menu - View commit details
-
Copy full SHA for 18c9542 - Browse repository at this point
Copy the full SHA 18c9542View commit details -
A resize triggers an Expose event and we are going to handle changed windows sizes there. So remove resize callback.
Configuration menu - View commit details
-
Copy full SHA for d3dc43d - Browse repository at this point
Copy the full SHA d3dc43dView commit details -
Add a function which will register a (Idle-) work procedure to do the redraw when there are no more other events pending. If the window size has changed after the last redraw, clear the window to clean up wrongly scaled relicts.
Configuration menu - View commit details
-
Copy full SHA for 4f22d4d - Browse repository at this point
Copy the full SHA 4f22d4dView commit details -
Use work procedure on Expose events.
Instead of doing a repaint on every Expose event, just trigger the work procedure to do a repaint when the queue is idle.
Configuration menu - View commit details
-
Copy full SHA for 1ed3a0b - Browse repository at this point
Copy the full SHA 1ed3a0bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b83466 - Browse repository at this point
Copy the full SHA 1b83466View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.