On Saturday, February 1, 2014 5:20:47 PM UTC-5, Edward K. Ream wrote: > > > As of rev 6628, vc.compute_all_organized_positions takes 0.02 sec instead > of 5+ seconds , a speedup of more than 200x. All the new code is in > vc.find_position_for_relative_unl..This saves a stupendous amount of > stepping through the outline. >
It's easy for me to lose track of what source files really look like. In the case of leoGlobals.py, the outline *looks* organized, but the actual sources are just one function after another, with the occasional odd smallish class thrown in. In other words, the source to the @auto algorithm looks like much more like a (long!) list than a tree. Thus, repeatedly searching top-level imported nodes is *very* expensive. As I was contemplated this (surprising to me!) fact, I realized that it's absurd to try to do better than the importers when dealing with class nodes (existing organizers created from classes). In fact, the importer will create a child node of the class node if and only if the node *should* be a child. Proof: if that were not so, the initial perfect import check would fail because the @others in the class node would apply to the wrong number of nodes. Thus, there is really *no* reason to create @existing-organizer: nodes for class nodes! The present code does create such nodes, and then vc.demote ignores them, which seems like something from the Department of Redundancy Department ;-) There is, however, another kind of existing organizer node: one that creates an child from a *following sibling* node, so there still must be support for those existing organizers. Anyway, this is all background (Engineering Notebook) stuff. Today's work will go back to basics: I'll attempt to fix some failing unit tests. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/groups/opt_out.
