Skip to content

Performance enhancements #22

@anselor

Description

@anselor

When generating large tables the performance drops significantly.
A large part of this is likely because tableformatter will seek through all of the fields of all of the rows multiple times to generate the display text from the data, measure the text, and then format/wrap the text to fit the column width/alignment.

Some of the following could be used to improve performance:

  • Limit the number of rows analyzed to determine column widths (configurable limit)
  • Once all columns have reached the maximum allowable width, stop measure rows
  • If all columns have pre-defined fixed widths, skip the measuring step

Also, tableformatter currently generates a full in-memory model of the entire table before rendering to a string. This can use a lot of memory. We can reduce the memory usage by only building the in-memory model up until the maximum analysis depth and then process/render the remaining rows on-demand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions