mirror of
https://github.com/plausible/analytics.git
synced 2024-12-27 03:21:37 +03:00
32a16a72fa
* Delete dead code * Speed up calculating usage for users with many many sites Currently, the settings page time outs for a user with 14k sites. This PR speeds things up by: 1. Doing the work in parallel (max 10 queries at once) 2. Increasing chunking size (300 -> 1000) Note that the query is relatively lightweight on clickhouse - running these queries manually takes ~70ms. If this becomes slow we can also introduce a PROJECTION to speed up the calculation, but this wasn't a bottleneck currently. On chunking size: ClickHouse can handle even 10k site_ids in a single query fast if run via clickhouse-client , but running the same query via ecto_ch it becomes really slow (60ms vs 1s). Not sure if this is a driver, serialization or networking issue. |
||
---|---|---|
.. | ||
mix/tasks | ||
plausible | ||
plausible_web | ||
workers | ||
oban_error_reporter.ex | ||
plausible_release.ex | ||
plausible_web.ex | ||
plausible.ex | ||
sentry_filter.ex |