Skip to content

Reduce the search limit for movies/shows/episodes for performance #8309

Description

@enter-a-random-username

This issue respects the following points:

  • This issue is not already reported on GitHub (I've searched it).
  • I agree to follow Jellyfin's Code of Conduct.
  • This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one.

Describe the bug

Currently, a limit of 800 is used and that is far from recommendation from the library settings any value greater than 100 may lead to bugs and reduced performance..

The limit for all 6 queries combined is 1300 results with combined query being largest at 800. 13x the amount that has a warning for library. Realist illy more like 10x because some will not reach 100 limits.

With meili (maybe without as well) I find the episode or album titled I with the highest score. Minimum char only make it harder and goal is fewer results.

DOM nodes
before search/empty

document.getElementsByTagName('*').length
> 378

search results displayed
document.getElementsByTagName('*').length
> 22648

Lighthouse warns above 800 nodes so > 28x the recommended amount by web.dev tool. This will be a heavy toll on slower devices.

Reproduction Steps

  1. Search something that matches a lot like I
  2. Look at result, it pages at 800 as defined in useSearchItems.ts as limit.

Expected/Actual behaviour

A reasonable fast amount or use filter/go into a library or maybe split them as well, so episodes will not fill all the items.
It is a search and not a filter, so people usually have something in mind.

Logs

No response

Server version

12.0 - master

Web version

12.0 - master

Build version

Release

Platform

Linux

Browser

Firefox, Chrmoium based

Additional information

Tests

800 limit
Up to 23000 nodes (depends on the query)
1.5MB JSON uncompressed (single search request with 800)

200 limit
9900 DOM nodes
400 KB JSON uncompressed (single search request with limit 200)

100 limit
5820 DOM nodes
199 KB JSON uncompressed (single search request with limit 100)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions