speeding up the dump of large data structures
|Assignee:||J. Templ||% Done:|
DevDebug and StdDebug use the expensive Flip operation for folds inserted for records and arrays. In case of dumping large data structures this slows down the generation of the dump so much that users may think that the system has crashed.
Reported by Ilya Ermakov, 2012-10-28.
Refers to CPC 1.7 rc5 change list number 45.
The code for bug demonstration:
MODULE TestDo; IMPORT Log, Math; PROCEDURE Test*; VAR dat: ARRAY 4096 OF ARRAY 2 OF ARRAY 2 OF INTEGER; BEGIN HALT(0) END Test; END TestDo.Test
speeding up the dump of large data structures by avoiding fold.Flip. Refs: #72.
Based on the proposal by Ilya Ermakov in CPC 1.7 rc5 but
without an explicit global stack.
The required context information is maintained inside the recursive dump procedures.
Signed-off-by: Josef Templ <firstname.lastname@example.org>