ooxml

Check-in [87b0383960]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Minor improvement: Don't create a list of length nr of cells in the sheet (and as much Tcl_Objs, with typically tons of doublets) but an array with just nr of rows in the sheet as entries. And, as an effect, the following sort has much lesser work.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | speed
Files: files | file ages | folders
SHA3-256: 87b0383960ac18add918f7d7fe69a5418aa59f4f4c305abcc836d5cfba987a58
User & Date: rolf 2019-08-08 20:32:45
Context
2019-08-08
22:09
Found and fixed one major problem: The code already sorts all cells once. Just store the results and use them easily looked up later. Still the # of milliseconds per cell needed while writing goes up slightly with the # of cells to write. But it's much better now. See [20c5ed5f11]. check-in: 998892470a user: rolf tags: speed
20:32
Minor improvement: Don't create a list of length nr of cells in the sheet (and as much Tcl_Objs, with typically tons of doublets) but an array with just nr of rows in the sheet as entries. And, as an effect, the following sort has much lesser work. check-in: 87b0383960 user: rolf tags: speed
20:19
Removed a bit useless code: lastRow, minCol and maxCol are only written, but never used. check-in: 03ff1d1e5c user: rolf tags: speed
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ooxml.tcl.

2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
	  }
	}
	Tag_sheetFormatPr baseColWidth 10 defaultRowHeight 16 x14ac:dyDescent 0.2 {}
	if {[info exists obj($ws,cols)] && $obj($ws,cols) > 0} {
	  Tag_cols {}
	}
	Tag_sheetData {
	  set rows {}
	  foreach idx [lsort -dictionary [array names cells $ws,*,*]] {
	    lassign [split $idx ,] sheet row col
	    lappend rows $row
	  }
	  foreach row [lsort -unique -integer $rows] {
	    set attr {}
	    if {[dict exists $obj(rowHeight,$ws) $row]} {
	      lappend attr ht [dict get $obj(rowHeight,$ws) $row] customHeight 1
	    }
	    # lappend attr spans [expr {$minCol + 1}]:[expr {$maxCol + 1}]
	    Tag_row r [expr {$row + 1}] {*}$attr {
	      foreach idx [lsort -dictionary [array names cells $ws,$row,*]] {







|


|

|







2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
	  }
	}
	Tag_sheetFormatPr baseColWidth 10 defaultRowHeight 16 x14ac:dyDescent 0.2 {}
	if {[info exists obj($ws,cols)] && $obj($ws,cols) > 0} {
	  Tag_cols {}
	}
	Tag_sheetData {
	  array unset rows
	  foreach idx [lsort -dictionary [array names cells $ws,*,*]] {
	    lassign [split $idx ,] sheet row col
            set rows($row) ""
	  }
	  foreach row [lsort -integer [array names rows]] {
	    set attr {}
	    if {[dict exists $obj(rowHeight,$ws) $row]} {
	      lappend attr ht [dict get $obj(rowHeight,$ws) $row] customHeight 1
	    }
	    # lappend attr spans [expr {$minCol + 1}]:[expr {$maxCol + 1}]
	    Tag_row r [expr {$row + 1}] {*}$attr {
	      foreach idx [lsort -dictionary [array names cells $ws,$row,*]] {