mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
fb09b7afa0
Summary: While looking at webhooks code, I noticed that it calls `ActiveDoc.fetchQuery` (which I think typically leads to the sandbox method `fetch_table`) with a query on the `id` column, where the values could potentially be all row IDs in the table (e.g. if a new column was added, as in a recent discussion about webhooks gone wrong). This suggests that `fetch_table` should try to avoid using a list for values when possible. In practice this only starts to become an issue at about 10k rows, so I don't know if this has caused any real problems, but it seemed like something worth fixing. Test Plan: Extended unit tests for correctness. Tested performance manually. Made a doc with this formula: ``` import time row_ids = list(Table2.table.row_ids) query = {"id": row_ids} start = time.time() result = table.table._engine.fetch_table('Table2', query=query) end = time.time() assert result[1] == row_ids end - start, len(row_ids) ``` Then put a bunch of rows in `Table2`. This diff made the returned elapsed time much less. Reviewers: georgegevoian Reviewed By: georgegevoian Subscribers: jarek Differential Revision: https://phab.getgrist.com/D4092 |
||
---|---|---|
.. | ||
docker | ||
grist | ||
gvisor | ||
pyodide | ||
bundle_as_wheel.sh | ||
gen_js_schema.py | ||
install_tz.js | ||
MANIFEST.in | ||
requirements3.in | ||
requirements3.txt | ||
requirements.txt | ||
run.sh | ||
setup.py | ||
watch.sh |