Commit Graph
19 Commits
Author SHA1 Message Date
Donkie 505faf3b35 Load entity extra-fields with selectin instead of joined
The spool listing already joins spool -> filament -> vendor, so joined
eager loading of all three `extra` collections multiplied their rows
together. With ~12 spool, ~9 filament and ~9 vendor extra fields, a
single GET /spool?limit=30 made the database materialize ~35k wide rows
(one per field combination) and then spent most of its time in
SQLAlchemy de-duplicating them back into 30 objects.

Switch the three `extra` relationships to lazy="selectin" so each
collection is fetched in its own WHERE id IN (...) query and nothing
multiplies. Measured on a 4911-spool SQLite database, GET /spool?limit=30
drops from 431 ms to 12 ms and limit=100 from 1358 ms to 23 ms, with
byte-identical responses across the spool/filament/vendor/group/search
endpoints and all 371 integration tests green on SQLite, PostgreSQL,
MariaDB and CockroachDB.

Claude-Session: https://claude.ai/code/session_014Cwk5Yyze9yPvkYkUtMAP4
2026-07-20 08:01:22 +02:00
Donkie b942d1f8a1 Replaced pdm with uv, updated backend deps, python 3.10 minimum, simplified install script 2026-01-07 22:01:02 +01:00
Donkie 8c164ac55f Added backend support for multi-color filaments 2024-05-28 18:49:24 +02:00
Donkie 1e4c73138c Added external ID fields to filaments and vendors 2024-05-12 21:58:00 +02:00
Matt Gerega c6f9abeced Changed initial_weight to be net weight, not gross weight 2024-04-10 11:00:46 -04:00
Matt Gerega e68f88da2a Added empty spool weight as an option field for the vendor 2024-03-26 20:35:50 -04:00
Matt Gerega 1d6830d769 Added initial_weight and empty_weight to spool 2024-03-26 13:55:44 -04:00
Donkie 77ac9d6a5c Added custom extra fields to backend
No integration tests yet, TBD
2024-01-23 18:58:57 +01:00
Donkie 44da991d47 Added a new backend settings system
This can be used for saving runtime-configurable settings in the database.
2024-01-16 19:17:06 +01:00
pdsccode 1eb78f01df Added pricing field for single spool 2023-12-30 07:29:27 +01:00
Donkie 9eb3aef08d Removed unused default registered func 2023-10-21 11:49:00 +02:00
Donkie 4cb2542a41 Added support for color_hex alpha channel 2023-08-12 21:32:20 +02:00
Donkie f89cf8ecd4 Added archived field to spools
Resolves #13
2023-07-14 14:19:57 +02:00
Donkie 4e409f6bb6 Added filament color code field 2023-06-01 19:56:24 +02:00
Donkie 235236d435 Ruff fixes 2023-05-28 22:55:11 +02:00
Donkie 7c7ee9296c Added extruder/bed temp override settings
Closes #4
2023-05-28 21:52:51 +02:00
Donkie d8fc5fc37b Added registered fields to all objects 2023-04-06 20:19:12 +02:00
Donkie 8a5d2e220b Spool weight now counts upwards instead
The used filament weight is now kept track of instead of remaining weight. This adds robustness to measurement errors which could accumulate and then the filament usage wouldn't get tracked anymore once the weight hit 0. Now it will just keep going.
2023-04-06 20:06:03 +02:00
Donkie 6fd9662c42 Renamed to Spoolman
Spoolson just didn't sound that good after all
2023-04-02 19:19:15 +02:00