Skip to content

[BUG] Long search queries hang or lag website #1329

@ragibson

Description

@ragibson

Describe the bug

  • Device/Os: [e.g. Android 10] Windows 10, Linux Mint, Android
  • Type: [e.g. Desktop/Mobile] Desktop, Mobile
  • Browser and version [e.g. Chrome 86.0]: Firefox 119.0, Chrome 119.0.6045.105
  • Hugo Version [ >=0.97.1 expected]: Latest
  • Theme Version [e.g. v4.0, master, or commit-id ]: Latest

Steps to reproduce the behavior:

Go to any website using the theme, e.g., https://adityatelange.github.io/hugo-PaperMod/ and type increasingly long queries into the search field.

As the search query gets longer, the website starts to lag and/or hang (much earlier than any reasonable index search should). Many other Hugo themes with similar search functionality do not seem to have this issue.

Expected behavior:

The search functionality should be efficient and not cause lag, as in many other Hugo themes, or be asynchronous when this is not feasible.

Repo/Source where this issue can be reproduced:

Any PaperMod website should work, including https://adityatelange.github.io/hugo-PaperMod/.

Screenshots

N/A

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions