nextcloud / nextcloud/recognize

People list rendering is slow (Also when merging)

Open
#523 15 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
699
Forks
68
Avg merge
1d 4h
Merged PRs (30d)
5

Description

Describe the bug

Every time I load https://nextcloud/apps/photos/faces the list of people seems to be dynamically loaded.

My full collection hasn't completed scanning but there's at least a thousand detected people so far, many of whom I need to merge.

This is causing two annoying problems:

  1. The list populates slowly, jumping around as it goes.
  2. Huge CPU usage on the client rendering the thing.

I can see a couple of requests for each person, e.g. https://nextcloud/remote.php/dav/recognize/pricey/faces/519/ & https://nextcloud/apps/photos/api/v1/preview/12067?x=512&y=512 but the response times suggest most of the time is not spent waiting for these. e.g. they're sequential & a second apart, but only taking milliseconds for a response, indicating other processing time between?

If you continue to navigate within the same tab and maintain the session, subsequent pages (e.g. navigating in and out of people) don't seem to need the people list to be processed again. Annoyingly I seem to be then hitting a different bug sometimes where the people list just doesn't appear when choosing e.g. "Merge with another person" and I have to hit reload...

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://nextcloud/apps/photos/faces or open a person and choose the three dots and "merge with another person".
  2. Wait...

Expected behavior

  • Not having to wait as long for the list of people to render.
  • Not having faces in the list jump around for 10 minutes while it renders.

Recognize (please complete the following information):

  • Installed app version: 3.2.3
  • WASM mode: No
  • Enabled modes: face recognition

Server (please complete the following information):

  • Nextcloud version: 25.0.1
  • OS: Ubuntu 20.04
  • Docker container (if applicable): No
  • RAM: 32GB
  • Processor Architecture ARM64

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the slow list at /apps/photos/faces and through the “Merge with another person” flow. Profile client-side rendering alongside the listed DAV and preview requests, then verify that a large people list renders without prolonged jumping, excessive CPU use, or disappearing during merge selection.

Written by the indexing model from the issue text.

Assessment

Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.