File: perf-1.tcl

package info (click to toggle)
tclxml 3.3~svn11-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,392 kB
  • sloc: ansic: 13,292; tcl: 11,656; xml: 3,269; sh: 559; makefile: 15
file content (18 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Create $childNum^2 elements

set childNum 50
catch {set childNum $numChildren}
set testNum 10
catch {set testNum $numTests}

time {
    set doc [dom::DOMImplementation create]
    set top [dom::document createElement $doc Test]
    for {set i 0} {$i < $childNum} {incr i} {
	set child [dom::document createElement $top Top]
	for {set j 0} {$j < $childNum} {incr j} {
	    dom::document createElement $child Child
	}
    }
} $testNum