Commit graph

63 commits

Author SHA1 Message Date
a39a0e6442 fix elapsed to always use floating point notation 2021-07-07 22:58:52 +02:00
2c30a67e83 add sql patching facilities
This includes the patches to get from the initial version of the
database to its current state - for the purpose of documentation.

Beware, if you already have an existing database, running this code
will likely result in an error and/or lead to some minor data loss.
You need to follow these steps to fix your DB:
1. delete all *.sql files from unwind/sql/
2. remove the .disabled suffix from unwind/sql/00000001-fix-db.sql.disabled
3. start the application once, this will fix up the database
4. revert all changes to unwind/sql/ – or leave it, it doesn't matter.
2021-07-05 23:15:48 +02:00
ea8d97f901 optimize runtime
The vast majority of time was spent loading each movie individually.
We always need to load every movie to check if it needs updating, or
if it maybe doesn't exist yet.  We can drastically increase performance
by loading the movies in large batches.
2021-07-04 23:17:53 +02:00
2e73b335c9 optimize runtime
- Postpone setting an ID for a Movie until it's added to the database.
- Use larger chunks to count the lines of an input file.
- Skip creating temporary objects for the score-map.
2021-07-04 21:32:13 +02:00
9f6baa99b0 optimize runtime
A `RatingRow`'s `id` and `updated` are never used, but creating them
a million+ times is quite expensive, so initializing them with `None`
saves a lot of time.
`dataclasses`' `fields` function is also quite expensive; loading the
fields from a row directly saves a lot of CPU cycles.
2021-07-04 18:47:26 +02:00
1038b4eaff add exact matching option 2021-06-24 22:26:47 +02:00
c823c51721 add elapsed processing time to response 2021-06-23 22:57:09 +02:00
0a21cb4420 add web API option to limit the number of results 2021-06-22 12:22:50 +02:00
f602542f43 fix discarding ratings
We want to limit the number of movies, not ratings.  By limiting the
number of movie IDs before loading all ratings with those movie IDs
we can achieve this.
2021-06-22 12:14:30 +02:00
a6adfefdd8 allow year relative filtering 2021-06-22 10:19:15 +02:00
d09880438d add more filtering options 2021-06-21 23:48:36 +02:00
7dd10f8bc3 add imdb full import mode 2021-06-21 18:54:03 +02:00
b5cb22822e init with some kind of working prototype 2021-06-15 19:09:21 +02:00