Commit Graph

15 Commits

Author SHA1 Message Date
Russell Smith
92996836d0 MDL-41674 backup: Use a trie for grouped path detection. 2015-01-11 12:54:32 +11:00
Dan Poltawski
a0035108b0 MDL-40585 fix trailing whitespace 2013-07-23 13:33:49 +08:00
Russell Smith
f27cb59c36 MDL-40585 backup: cache XML parent paths
For $this->groupedpaths, using a key is faster as there is
no need to do in_array searches.

Parent cache allows dirname calls to be substantially reduced.
2048 was chosen as a cache size as this class operates on chunks
of the restore at a time, 8k questions produces a parent cache of
about 500 paths and uses 300K of memory.  Scaling up to 2048 will
use about 1.2M of RAM for really large restores.  This is acceptable
for the 48% function call reduction and the 10% runtime improvement
seen.
2013-07-15 15:07:35 +10:00
Eloy Lafuente (stronk7)
43b83ea19e MDL-37893 Always notify pending starts before dispatching chunk 2013-02-07 20:59:43 +01:00
David Mudrák
2c06c715c7 MDL-37893 Allow elements with no final tags to form a grouped path 2013-02-07 13:00:19 +01:00
Eloy Lafuente (stronk7)
d4dd06591b MDL-27594 backup - out unused (and incorrect) condition + stronger tests 2011-05-24 11:55:39 +02:00
Eloy Lafuente (stronk7)
54b8f33421 MDL-27594 backup - fix start/end notifications on empty chunks 2011-05-23 00:58:45 +02:00
Eloy Lafuente (stronk7)
8298bedab7 MDL-27475 backup - fix start/end notifications order + tests 2011-05-11 20:01:13 +02:00
Eloy Lafuente (stronk7)
14e6710d99 MDL-26896 parser - add start/end path notifications 2011-04-11 02:16:58 +02:00
Eloy Lafuente (stronk7)
5539e69862 MDL-26229 restore - parser improvements (repetitions and skipped tags) 2011-02-12 02:19:02 +01:00
Eloy Lafuente
e521039d22 MDL-24381 backup - avoid infinite iteration under windows caused by platform-dependent dirname() 2010-09-28 21:26:11 +00:00
Eloy Lafuente
f35de25886 MDL-23796 backup - improve parser to discard whitespace-empty tags 2010-08-24 14:07:31 +00:00
Eloy Lafuente
dc5a2f8a5a MDL-21432 backup - using grouped parser in moodle_backup.xml + minor changes in common stuff 2010-07-05 22:10:51 +00:00
Eloy Lafuente
4c7f6ac693 MDL-22699 restore parser - new grouped parser, useful for multilevel tags 2010-07-05 00:50:06 +00:00
Eloy Lafuente
be866f9d6c MDL-22699 xml parser - to be used by restore 2010-06-07 14:40:12 +00:00