diff options
| -rw-r--r-- | lib/axlsx/workbook/worksheet/col.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/worksheet/col.rb b/lib/axlsx/workbook/worksheet/col.rb index a2658724..42997a2b 100644 --- a/lib/axlsx/workbook/worksheet/col.rb +++ b/lib/axlsx/workbook/worksheet/col.rb @@ -104,7 +104,12 @@ module Axlsx # @see Col#width def width=(v) - Axlsx.validate_unsigned_numeric(v) unless v == nil + # Removing this validation make a 10% difference in performance + # as it is called EVERY TIME A CELL IS ADDED - the proper solution + # is to only set this if a calculated value is greated than the + # current @width value. + # TODO!!! + #Axlsx.validate_unsigned_numeric(v) unless v == nil @custom_width = @best_fit = v != nil @width = v end |
