Skip to content

generate descriptions in advance to speed up schemadoc

Administrator requested to merge cc/speed-up-schemadoc into main

Created by: camdencheek

This modifies schemadoc to generate all descriptions in one go rather than running a psql command per table/view. Instead of running psql -c '\d table_name' per table, this changes schemadoc to run psql -c '\d *' once at the beginning. We split the output by object being described, and filter to only tables/views, then pass the result into describeTable. The changes cause no difference in the generated schema.md.

This decreases the runtime of schemadoc from 57s to 20s on my machine.

Merge request reports

Loading