stash/ui/v2.5
gitgiggety 3e526a49a4
Add indexes for path and checksum to images (#1740)
* Add indexes for path and checksum to images

The scenes table has unique indexes/constraints on path and checksum
colums. The images table doesn't, which doesn't really make sense, as
scanning uses these colums extensively which warrents an index, and both
should be unique as well.

Adding these indexes thus heavily improves the scanning tasks
performance. On a database containing 4700 images a (re)scan of those
4700 files, which thus shouldn't do anything, took 1.2 seconds, with the
indexes added this only takes 0.4 seconds. Taking the same test on a
generated database containing 4M images + the actual 4700 images took 26
minutes for a rescan, and with the index existing also only takes 0.4
seconds.

* Add images.checksum unique constraint in code with fallback

Work around the issue where in some cases duplicate images (/checksums
on images) might exist. This as discussed in #1740 by creating the index
on startup and in case of an error logging the duplicates. This so the
users where this scenario exists can correct the database (by searching
on the logged checksum(s) and removing the duplicates) and after a
restart the unique index / constraint will still be created. In case
when creating the unique index fails a "normal" / non-unique index is
created as surrogate so the user will still get the performance benefit
(for example during scanning) without being forced to remove the
duplicates and restart beforehand. This surrogate is also automatically
cleaned up after the unique index is succesfully created.
2021-09-21 11:48:52 +10:00
..
.vscode Update zh-tw strings & fix various hard strings (#1666) 2021-08-26 08:51:54 +10:00
public Transcode stream refactor (#609) 2020-07-23 11:56:08 +10:00
src Add indexes for path and checksum to images (#1740) 2021-09-21 11:48:52 +10:00
.babelrc i18n 2020-03-01 21:04:37 +01:00
.editorconfig Update scraping docs (#929) 2020-11-10 13:03:44 +11:00
.env Performer UI improvements (#1168) 2021-03-05 15:46:20 +11:00
.eslintrc.json Update libraries and regenerate yarn.lock (#1231) 2021-03-30 12:33:57 +11:00
.gitignore Linting config 2020-03-01 21:04:32 +01:00
.stylelintrc Add TruncatedText component (#932) 2020-11-27 13:01:37 +11:00
codegen.yml Library updates (#792) 2020-09-11 13:01:00 +10:00
package.json Add Handy / Funscript support (#1377) 2021-05-24 13:34:28 +10:00
README.md Cut over to v2.5 UI (#433) 2020-04-03 08:46:23 +11:00
tsconfig.json Upgrade create-react-app and assorted libraries (#914) 2020-11-25 13:20:48 +11:00
yarn.lock Add Handy / Funscript support (#1377) 2021-05-24 13:34:28 +10:00

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

yarn format

Formats the whitespace of all typescript and scss code with prettier, to ease editing and ensure a common code style.

Should ideally be run before all frontend PRs.

yarn eject

Note: this is a one-way operation. Once you eject, you cant go back!

If you arent satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.

You dont have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

yarn build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify