mediawiki-extensions-Visual.../modules/ve/dm
Catrope 9372ca60ad Kill getOffsetFromNode() with fire
The way it operated was evil. It did a depth-first search from the root,
finding the node using reference equality. For documents with deep
structures, this could take a long time. Inez did some profiling and
found it was called tens of millions of times on a complex document.

Kill getOffsetFromNode() and move its functionality to getOffset().
The logic has been completely rewritten: getOffset() now traverses
up from the node rather than down from the root, and pretty much does
the reverse of what getNodeFromOffset() does. This should be much more
efficient even without offset caching in the node objects (which we may
still implement later).

Change-Id: I125f9fa423c40db6472e2c4a7c94214218ba3bc7
2013-05-09 17:26:22 -07:00
..
annotations Configurable insertion annotations 2013-05-06 22:57:35 +00:00
lineardata Fix range translation for surface fragments 2013-04-30 17:08:15 +01:00
metaitems Create meta item for defaultsort 2013-04-29 15:33:37 +01:00
nodes Preserve HTML attributes recursively 2013-05-08 11:10:07 -07:00
ve.dm.Annotation.js Configurable insertion annotations 2013-05-06 22:57:35 +00:00
ve.dm.AnnotationFactory.js Convert AnnotationFactory and MetaItemFactory to NamedClassFactories 2013-04-09 12:05:05 -07:00
ve.dm.AnnotationSet.js Configurable insertion annotations 2013-05-06 22:57:35 +00:00
ve.dm.BranchNode.js Fix documentation to place @emits in the correct place 2013-03-25 21:06:05 +00:00
ve.dm.Converter.js Also render attributes of the form html/i-j/attrName in CE 2013-05-08 18:10:46 +00:00
ve.dm.DataString.js Code style fixes 2013-05-06 12:36:52 +01:00
ve.dm.Document.js Kill getOffsetFromNode() with fire 2013-05-09 17:26:22 -07:00
ve.dm.DocumentSlice.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.dm.DocumentSynchronizer.js Deduplicate childUpdate events based on transaction and appliedness 2013-04-25 17:08:30 -07:00
ve.dm.IndexValueStore.js Code style fixes 2013-05-06 12:36:52 +01:00
ve.dm.InternalList.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.dm.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.dm.LeafNode.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.LinearData.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.MetaItem.js Transactions to store metadata merge info when present 2013-04-16 22:26:56 +01:00
ve.dm.MetaItemFactory.js Make .static.storeHtmlAttributes more versatile 2013-05-07 14:45:26 -07:00
ve.dm.MetaList.js Code style fixes 2013-05-06 12:36:52 +01:00
ve.dm.Model.js Preserve HTML attributes recursively 2013-05-08 11:10:07 -07:00
ve.dm.ModelRegistry.js Force about grouping for multi-element about groups 2013-05-05 00:07:29 -07:00
ve.dm.Node.js Kill getOffsetFromNode() with fire 2013-05-09 17:26:22 -07:00
ve.dm.NodeFactory.js Make .static.storeHtmlAttributes more versatile 2013-05-07 14:45:26 -07:00
ve.dm.Surface.js Move completeHistory from dm.Surface to dm.Document 2013-05-09 14:54:25 -07:00
ve.dm.SurfaceFragment.js Move completeHistory from dm.Surface to dm.Document 2013-05-09 14:54:25 -07:00
ve.dm.Transaction.js ve.ce.ProtectedNode 2013-05-07 00:08:48 +00:00
ve.dm.TransactionProcessor.js Kill getOffsetFromNode() with fire 2013-05-09 17:26:22 -07:00