CI to automate build of zotero tarball for zotero aport
https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/testing/zotero
![]() When an item is erased (removed from the trash or cleaned up from a feed), we set a flag to purge values in `itemDataValues` on the next startup, with this query: DELETE FROM itemDataValues WHERE valueID NOT IN (SELECT valueID FROM itemData); For some people, that query was incredibly slow and would result in Zotero intermittently hanging on "Loading items…" for a long time at startup. It's possible this is mostly limited to people who subscribe to high-volume feeds and have a lot of item churn. One affected person had >900K values in `itemDataValues` despite having only 20K items. It turns out the slow query is due to the foreign-key constraint on `itemData(valueID)` that references`itemDataValues(valueID)`. SQLite is checking every row being deleted from `itemDataValues` against `itemData`, even though the query is specifically removing rows that don't exist in `itemData`! For the 900K-value DB, disabling foreign-key checks causes the `DELETE` query to take 25 seconds instead of...some much longer time that I didn't wait for. We already had an `executeTransaction()` flag, `disableForeignKeys`, to temporarily disable foreign-key checks, but it didn't do so in a way that was safe for post-initialization usage -- a write query outside of a transaction could've run between the transaction commit and foreign-key checks being re-enabled. This commit changes it to properly block all other queries unless they include an `ignoreDBLock` option, meaning that queries within the function passed to the transaction need to include that option. (And since that's not realistic for the couple other uses of `disableForeignKeys` -- one for a test and one in code that almost certainly hasn't been run by anyone in 15 years -- those now just run `PRAGMA foreign_keys=OFF|ON` explicitly, leaving this as the only current use.) |
||
---|---|---|
.github | ||
app | ||
chrome | ||
defaults/preferences | ||
js-build | ||
note-editor@cd609cafd3 | ||
pdf-worker@f9857be700 | ||
reader@51fb33cb80 | ||
resource | ||
scripts | ||
scss | ||
styles@1554b78c31 | ||
test | ||
translators@60a7cb79e9 | ||
types/gecko | ||
.babelrc | ||
.eslintignore | ||
.eslintrc | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
chrome.manifest | ||
CONTRIBUTING.md | ||
COPYING | ||
package-lock.json | ||
package.json | ||
README.md | ||
update.rdf | ||
version |
Zotero
Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.
Please post feature requests or bug reports to the Zotero Forums. If you're having trouble with Zotero, see Getting Help.
For more information on how to use this source code, see the Zotero documentation.