Commit Graph

20 Commits

Author SHA1 Message Date
Klaas van Schelven
354af7ea0a Fix issues as reported by bandit or mark as nosec
Nothing worrying, but good to have checked this regardless
and important to have a green pipeline.

Fix #175
2025-07-30 12:16:40 +02:00
Klaas van Schelven
1eea9268a5 Optimization: Search on EvenTag without involving Event if possible
When searching by tag, there is no need to join with Event; especially when
just counting results or determining first/last digest_order (for navigation).

(For the above "no need" to be actually true, digest_order was denormalized
into EventTag).

The above is implemented in `search_events_optimized`.

Further improvements:

* the bounds of `digest_order` are fetched only once; for first/last this info
  is reused.

* explicitly pass `event_qs_count` to the templates

* non-event pages used to calculate a "last event" to generate a tab with a
  correct event.id; since we simply have the "last" idiom, better use that.
  this also makes clear the "none" idiom was never needed, we remove it again.

Results:

Locally (60K event DB, 30K events on largest issue) my testbatch now
runs in 25% of time (overall).

* The effect on the AND-ing are in fact very large (13% runtime remaining)
* The event details page is not noticably improved.
2025-03-12 20:38:07 +01:00
Klaas van Schelven
aa341c7437 Test/debug script for search performance 2025-03-12 14:14:05 +01:00
Klaas van Schelven
d23f1f0a3b Remove load_performance_fixture
in the belief that it was only (mostly?) useful in the context of
the pc-registry performance tests. (We do our other tests end-to-end
using the stress tests)
2024-07-18 13:17:45 +02:00
Klaas van Schelven
d56a8663a7 Remove the periodCounter and the PC registry
direct consequence of switching to SQL-based counting
2024-07-16 15:08:05 +02:00
Klaas van Schelven
2ddc33017a Add performance context_manager for timings
was useful during debugging
2024-07-08 09:40:47 +02:00
Klaas van Schelven
8f401dafd6 Document some findings (Friday's work) 2024-07-01 13:29:56 +02:00
Klaas van Schelven
2bdc357a87 Eviction: logging 2024-06-24 13:58:45 +02:00
Klaas van Schelven
8b0a4aafe0 Note playground.bugsink findings of get_period_counter initialization 2024-05-23 14:32:30 +02:00
Klaas van Schelven
a24c295535 Forgotten file added 2024-05-22 20:57:16 +02:00
Klaas van Schelven
48307daa0f Introduce 'Grouping' data-modeling 2024-04-08 11:41:15 +02:00
Klaas van Schelven
8976367331 Remove old script (it's now a command) 2024-01-07 22:09:56 +01:00
Klaas van Schelven
5cf1445eeb thoughts about pc registry; performance of the pc registry 2024-01-05 23:07:31 +01:00
Klaas van Schelven
da04ebe6c7 prev_tup with n parameter
this makes the usages of prev_tup approx 3 times faster
2024-01-05 17:47:59 +01:00
Klaas van Schelven
02180d391d Rename -> initial_event_state 2024-01-04 20:20:11 +01:00
Klaas van Schelven
bf9c40c0e2 Rewrite comment 2024-01-04 20:19:06 +01:00
Klaas van Schelven
0fec3469cb Performance of event-handling 2024-01-04 20:15:38 +01:00
Klaas van Schelven
63c02c9ff5 print_thoughts_about PeriodCounter.inc() 2023-12-19 17:08:57 +01:00
Klaas van Schelven
806bf1a0c5 Tool to test w/ bursty data 2023-12-18 23:32:08 +01:00
Klaas van Schelven
84c12e97a1 First performance-tests added 2023-12-18 22:52:22 +01:00