luci/libs/web
Jo-Philipp Wich 0cb0742818 [PATCH] Allow smarter node creation based on visibility during createtree
As I've brought up on the mailing list thread "High latency caused by full tree creation", there is a large amount of delay per LuCI request which is spent building the node tree in createtree(). Most nodes created aren't 
needed for the view presented to the user and only serve to consume memory and CPU time during a page load.

My idea is to provide an easy mechanism for index()ers to determine which needs to be created and what isn't. Due to the constraints of the standard LuCI web interface, this optimization needs to establish a few rules:

 * The page requested must have its node created
 * All parents of the page being requested must be created, so the children inherit the track
 * All the top-level nodes "Status", "System", "Services", "Network" (and others added by extensions) must be created in order to have their top-level tabs in the UI
 * All peers of second-level nodes need to be created as well for the same reason, to display their links on the subindexes 
                
To make this easy to implement in each controller, the attached patch adds an "inreq" field to each created node to indicate if it lies on the request path. To satisfy the "top level node" requirement, we always 
add the top level node, then check its inreq property if the top-level node is not "in request", then the controller can exit index() early.
2011-08-12 11:05:59 +00:00
..
htdocs/luci-static/resources libs/web: add new datatypes min(...), max(...) and neg_network_ip4addr 2011-06-17 10:52:49 +00:00
luasrc [PATCH] Allow smarter node creation based on visibility during createtree 2011-08-12 11:05:59 +00:00
root libs: merge libs/cbi into libs/web 2010-10-12 05:15:32 +00:00
src libs/web: fix filtering of overlong utf8 sequences 2010-11-28 20:25:03 +00:00
Makefile libs/web: add UTF-8 validation and pcdata escaping C routines to template parser 2010-11-12 22:37:50 +00:00