1
0
mirror of https://github.com/e107inc/e107.git synced 2025-05-04 11:24:54 +02:00
php-e107/e107_handlers
Nick Liu 8a675021ff
Hybrid e_tree_model flat lists or parent-children
e_tree_model is apparently used for flat lists as well as parent-child
relationships (trees). Trees are expected to be far smaller than possible flat
lists. Very large flat lists (10,000+ rows or greater) are rendered very slowly
because of the tree computation overhead.

This change figures out whether a flat list or a tree is requested and chooses
the appropriate code to run based on what is requested. Trees run the more
expensive code while flat lists are returned as-is.

In addition, the tree rendering code has been optimized. Optimizations:

* Unchanging tree node ID is set once instead of inside a foreach() loop
* The parent-child query is now sorted by the sort parent ID so that each move
  rows to tree nodes iteration doesn't have to run through every remaining row

Fixes: #3062
2018-03-06 16:08:11 -06:00
..
2017-07-17 12:10:32 -07:00
2017-12-12 21:44:50 -08:00
2017-07-21 08:31:50 +02:00
2018-03-04 20:01:55 -08:00
2017-04-16 06:37:54 +02:00
2017-01-11 19:14:41 -08:00
2017-12-11 17:11:22 -08:00
2018-01-23 08:14:26 -06:00
2018-01-16 14:41:51 -08:00
2017-02-13 08:03:40 +01:00
2017-03-18 12:11:56 -07:00
2017-12-02 11:57:27 -08:00
2017-09-19 16:19:39 -07:00