[geany/geany] ef0b05: Rewrite symbols tree updating code

Colomban Wendling ban at xxxxx
Mon Nov 21 14:33:20 UTC 2011


  Branch: refs/heads/master
  Home:   https://github.com/geany/geany

  Commit: ef0b05991794cceabb2e255439cf7ea511100fd3
      https://github.com/geany/geany/commit/ef0b05991794cceabb2e255439cf7ea511100fd3
  Author: Colomban Wendling <ban at herbesfolles.org>
  Date:   2011-11-20 (Sun, 20 Nov 2011)

  Changed paths:
    M src/sidebar.c
  M src/sidebar.h
  M src/symbols.c

  Log Message:
  -----------
  Rewrite symbols tree updating code

Old implementation was not really fitting the updating needs and had a
bug making symbols disappear if they haven't changed but their parent
did (e.g. when a C++ constructor's signature changed).

New implementation does:
1) walk old tree, updating or removing rows;
2) add remaining tags.

It walks less than (new_tags + old_tags + new_tags) in the worst case,
thanks to some hash table-based caching;  and also gets rid of the
"valid" column in the symbols tree, saving a few bytes in memory.

Finally, there is a ~7% performance gain (from 21 to 18ms) upon common
tree updates, sometimes more.


  Commit: 319a6355fef68f2db541bbe4ae65473f83289c0c
      https://github.com/geany/geany/commit/319a6355fef68f2db541bbe4ae65473f83289c0c
  Author: Colomban Wendling <ban at herbesfolles.org>
  Date:   2011-11-20 (Sun, 20 Nov 2011)

  Changed paths:
    M src/symbols.c

  Log Message:
  -----------
  Use GSlice to allocate cached tree iters


  Commit: 425e0e39be146af5b642228bb8df0a3edc7b1739
      https://github.com/geany/geany/commit/425e0e39be146af5b642228bb8df0a3edc7b1739
  Author: Colomban Wendling <ban at herbesfolles.org>
  Date:   2011-11-21 (Mon, 21 Nov 2011)

  Changed paths:
    M src/sidebar.c
  M src/sidebar.h
  M src/symbols.c

  Log Message:
  -----------
  Merge branch 'symbols-tree-update-fixes'


Compare: https://github.com/geany/geany/compare/39606dd...425e0e3



More information about the Commits mailing list