Jiří Techet 3cf0161527 Store "equal" tags into binary trees instead of lists in Symbol tree
At the moment tags with identical names are stored into a linked list in
tags_table and parents_table. This however leads to quadratic complexity
when looking up the nearest parent or tag in tree because the whole list
has to be traversed.

Use binary trees indexed by line number instead of lists so the lookup can
be performed in log(N) time and the overall complexity is N*log(N) instead
of N^2.

The GTree API is a little stupid because during the search it doesn't give
access to the value and it doesn't tell when a leaf node was reached. For
this reason the lookup has to be made in two steps - first, the best line
number is found (returned in user_data) and then a normal search for the
found line number is made to get the value stored in the tree.

This patch fixes the problem described in #577 when e.g. a big json export
file contains many identically named tags.
2016-07-22 23:21:09 +02:00
..
2016-03-13 13:27:28 +01:00
2014-05-21 15:37:19 -07:00
2016-07-10 16:07:56 +02:00
2014-05-21 15:37:19 -07:00
2014-05-21 15:37:19 -07:00
2014-05-21 15:37:19 -07:00
2014-05-21 15:37:19 -07:00
2016-06-22 16:10:32 +02:00
2014-05-21 15:37:19 -07:00
2014-05-21 15:37:19 -07:00
2015-03-22 15:32:54 +01:00
2014-05-21 15:37:19 -07:00
2015-03-04 12:40:36 +01:00
2016-06-22 16:10:32 +02:00
2014-05-21 15:37:19 -07:00
2014-05-21 15:37:19 -07:00
2016-03-01 19:21:41 +01:00
2016-02-16 07:14:27 +01:00
2014-05-21 15:37:19 -07:00
2016-02-28 02:12:35 +01:00
2014-05-21 15:37:19 -07:00
2016-03-01 19:21:41 +01:00
2016-06-25 16:15:08 +02:00
2014-05-21 15:37:19 -07:00