feat(picker): small previews, a search across all packs and an index the browser keeps #16
No reviewers
Labels
No labels
ansible
ci
dependencies
digest
docker
fix
go
javascript
major
minor
patch
php
python
released
security
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
dawid/nextcloud-talk-stickers!16
Loading…
Reference in a new issue
No description provided.
Delete branch "perf-usability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The picker was heavy and its search narrow. This makes it lighter and finds more, and the
server's extra cost is one-time.
What was measured
the browser had to decode 120 large animations at once.
/api/packscarried every sticker's name and keywords of all five packson every page load, without HTTP caching, read from app data (S3 in the homelab) each time.
What changes
lib/Packs/Thumbnail.php): a 128 px still WebP beside each large original(
<id>.thumb.webp), from the first frame of an animated one.as it costs no more than a preview would.
Animated stickers are 2–4 KB instead of 190–620 KB, so a page of animated stickers is
about 0.4 MB instead of 40 MB. Static ones are 3–7 KB instead of 20–40 KB.
on it or it has the focus; the sticker sent is the original.
MakeThumbnails, which the update's repair step queues. It reads the images already there,so nothing is downloaded, and it takes about half an hour of one CPU (about 0.5 s per
animated sticker).
occ talk_stickers:packs --thumbnailsdoes it at once./api/packsnow carries only the person's own packs and the address/api/index/<build>.Cache-Control: public, max-age=31536000, immutable, and the browser downloads it once perbuild. An old build's address redirects to the current one.
Tests
nextcloud-app-server, the extendedtests/server/check.sh):public, max-age=31536000, immutable;1f600.thumb.webpis served asimage/webp, 3,544 bytes (its original is 25 KB);ThumbnailTestandThumbnailsForOldBuildsTestrun with Imagick, in Nextcloud 35's image,and are skipped in CI's PHP image.
ThumbnailsForOldBuildsTestchecks that an old build gets its previews once and that smalland SVG stickers get none.
IndexTestchecks the index's caching, its redirect and the 404 before a build.composer cs:check, Psalm,node --check,tests/l10n.js(no new strings), markdownlint.Cost
through PHP and S3.
Tests of CI / php (dev-master): passed
21 passed, 0 failed, 3 skipped (24 tests, 0.0 s)
Of
f7153591d1, the run, updated by every run.Tests of CI / php (dev-stable32): passed
21 passed, 0 failed, 3 skipped (24 tests, 0.1 s)
Of
f7153591d1, the run, updated by every run.Tests of CI / php (dev-stable33): passed
21 passed, 0 failed, 3 skipped (24 tests, 0.1 s)
Of
f7153591d1, the run, updated by every run.Tests of CI / php (dev-stable34): passed
21 passed, 0 failed, 3 skipped (24 tests, 0.0 s)
Of
f7153591d1, the run, updated by every run.Tests of CI / php (dev-stable35): passed
21 passed, 0 failed, 3 skipped (24 tests, 0.0 s)
Of
f7153591d1, the run, updated by every run.