Skip to content

Commit

Permalink
[html-table][API] deprecate gnc:html-table-append-column!
Browse files Browse the repository at this point in the history
This function is inefficient. Each column appended will require
scanning every row of existing html-table, scanning the row's elements
and appending the desired data.
  • Loading branch information
christopherlam committed Dec 28, 2020
1 parent ef8f8bd commit b1f9e8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gnucash/report/html-table.scm
Expand Up @@ -415,6 +415,8 @@
(define (gnc:html-table-append-column! table newcol)
(define width (apply max (cons 0 (map length (gnc:html-table-data table)))))
(define (add-fn a b) (list-set-safe! b width a))
(issue-deprecation-warning "gnc:html-table-append-column! deprecated. please \
populate html-table row-wise using gnc:html-table-append-row! instead.")
(let lp ((newcol newcol)
(olddata (reverse (gnc:html-table-data table)))
(res '())
Expand Down

0 comments on commit b1f9e8e

Please sign in to comment.