1
0
Fork 0
Commit graph

14 commits

Author SHA1 Message Date
Matthew Holt
03d126ed68
Use PRAGMA optimize instead of ANALYZE
This is supposedly a smarter way to do ANALYZE, as it only analyzes what sqlite thinks is needful. Should hopefully address some reports of too-frequent, long-running analyze queries.

There was one time I noticed that the pragma didn't improve query plans, until I ran analyze specifically which did improve it, but that was using the old DB connection model where I had a single pool of mixed readers/writers, so maybe it's possible that the new pooling style (separate r/w pools) also addresses that, I dunno.
2025-10-23 11:30:05 -06:00
Matthew Holt
fb3d529228
Refactor thumbnail DB handle as well
Fix error when repo property doesn't exist
2025-09-30 14:04:53 -06:00
Matthew Holt
e9a7c03c53
Fix ExFAT crashes; refactor sql.DB handling
The crashes on ExFAT are caused by a bug in the MacOS ExFAT driver. It is unclear whether other OSes are affected too.

https://github.com/mattn/go-sqlite3/issues/1355

We now utilize sqlite's concurrency features by creating a write pool (size 1) and a read pool, and can eliminate our own RWMutex, which prevents reads at the same time as writes. Sqlite's WAL mode allows reads concurrent with writes, and our code is much cleaner.

Still need to do similar for the thumbnail DB.

Also could look into using prepared statements for more efficiency gains.
2025-09-30 12:31:41 -06:00
Matthew Holt
5994da8c75
Run ANALYZE less frequently; use write lock
Doubt this will fix the DB corruption errors, but, likely a good change anyway
2025-09-26 14:57:36 -06:00
Matthew Holt
336ff7fae0
Fix new lint warnings
Must have been a change in golang-ci-lint
2025-07-01 15:41:07 -06:00
Matthew Holt
ba4635cf7e
Fix data file handling
It wasn't updated properly with the big pipeline refactor
2025-05-04 13:28:20 -06:00
Matthew Holt
f0697d2d6b
Refactor embedding jobs; enhance tooltips; upgrade gofakeit to v7
The gofakeit upgrade uses the new math/rand/v2 package, which uses uint64 more than int64, so we had to change a bunch of row IDs from int64 to uint64.
2025-04-24 16:33:41 -06:00
Matthew Holt
bb9151628f
WIP: new entity page; delete almost all DB indexes
Imports are now 4-5x faster and queries are still just about as fast. New indexes should only be created after proving their usefulness.
2025-01-07 13:42:05 -07:00
Matthew Holt
d7b1d73796
Auto-resume jobs on start; improve checkpoint performance 2024-12-16 16:23:26 -07:00
Matthew Holt
a4d8bc923d
Data source checkpoints; refine import concurrency
And related improvements and fixes
2024-12-15 22:40:58 -07:00
Matthew Holt
cbaa39b1b9
Implement proper ANALYZE maintenance 2024-12-13 20:55:22 -07:00
Matt Holt
746e5d6b5c
Refactored import flow, new import UI, thumbnails stored in timeline, etc. (close #3) (#43)
* Schema revisions for new import flow and thumbnails

* WIP settings

* WIP quick schema fix

* gallery: Image search using ML embeddings

Still very rough around the edges, but basically works.

'uv' gets auto-installed, but currently requires restarting Timelinize before it can be used.

Lots of tunings and optimizations are needed. There is much room for improvement.

Still migrating from imports -> jobs, so that part of the code and schema is still a mess.

* Implement search for similar items

* Finish import/planning rewrite; it compiles and tests pass

* Fix some bugs, probably introduce other bugs

* WIP new import planning page

* Fix Google Photos and Twitter recognition

* Finish most of import page UI; start button still WIP

* WIP: Start Import button

* Fixes to jobs, thumbnail job, import job, etc.

* Implement proper checkpointing support; jobs fixes
2024-12-06 11:03:29 -07:00
Matthew Holt
3066ddbeb9
Major linting overhaul
I've addressed most of the "fast" linters errors locally in my editor.

Some linters are broken or buggy.
2024-08-29 16:43:52 -06:00
Matthew Holt
1daf6f4157
Initial open source commit 2024-08-11 08:02:27 -06:00