mediawiki-extensions-Visual.../modules/ve/test/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
..
lineardata Fix range translation for surface fragments 2013-04-30 17:08:15 +01:00
nodes Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.dm.AnnotationSet.test.js Further AnnotationSet optimisation: create containsIndex 2013-04-25 22:55:43 +01:00
ve.dm.BranchNode.test.js Kill getOffsetFromNode() with fire 2013-05-09 17:26:22 -07:00
ve.dm.Converter.test.js GeneratedContentNodes store DOM elements, not HTML (like aliens) 2013-05-02 18:22:56 +01:00
ve.dm.Document.test.js Transactions to store metadata merge info when present 2013-04-16 22:26:56 +01:00
ve.dm.DocumentSynchronizer.test.js Code style fixes 2013-05-06 12:36:52 +01:00
ve.dm.example.js Preserve HTML attributes recursively 2013-05-08 11:10:07 -07:00
ve.dm.IndexValueStore.test.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.LeafNode.test.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.LinearData.test.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.MetaList.test.js Transactions to store metadata merge info when present 2013-04-16 22:26:56 +01:00
ve.dm.Model.test.js Make .static.storeHtmlAttributes more versatile 2013-05-07 14:45:26 -07:00
ve.dm.ModelRegistry.test.js Fix ModelRegistry bugs 2013-04-08 18:05:34 -07:00
ve.dm.Node.test.js Remove html/* attributes in getClonedElement() 2013-04-18 09:27:28 -07:00
ve.dm.NodeFactory.test.js Correct name of can(Node)HaveGrandchildren functions 2013-03-13 23:25:33 +00:00
ve.dm.Surface.test.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.dm.SurfaceFragment.test.js Code style fixes 2013-05-06 12:36:52 +01:00
ve.dm.Transaction.test.js Code style fixes 2013-05-06 12:36:52 +01:00
ve.dm.TransactionProcessor.test.js Code style fixes 2013-05-06 12:36:52 +01:00