Skip to content

Request the build feed page once - #612

Merged
anfimovdm merged 1 commit into
AlmaLinux:masterfrom
eabdullin1:build-feed-single-request
Nov 9, 2026
Merged

anfimovdm merged 1 commit into
AlmaLinux:masterfrom
eabdullin1:build-feed-single-request

Conversation

@eabdullin1

Copy link
Copy Markdown
Contributor

Problem

The build feed sends every request twice:

  • opening / calls loadFeedPage() directly in created(), and updateFilter() right before it stores a new filter object, so the buildFeedQuery watcher loads the page once more;
  • applying a search stores the filter from the search form (the watcher loads the page) and then pushes /search?..., where the $route.query watcher stores the same filter again and the page is loaded again.

Both copies are identical. On production a project=bash search took 3.5 s and 6.2 s for the two copies competing with each other.

Fix

loadFeedPage() doesn't send a request while the same one is still running. The response of a request that a newer one has replaced is ignored, so a slow search can no longer overwrite the results of the next search.

Requests that differ, or the same request sent after the previous one has finished (e.g. applying the same search again to refresh the feed), are sent as before.

Checks

In the browser against production data (read-only), counting /api/v1/builds/ requests:

action before after
open / 2 1
search project=bash from the search form 2 1
open /search?projectName=kernel 2 1
next page 1 1
apply the same search again after it loaded 2 1 (refreshes)

Searching bash and then kernel-rt 0.3 s later: the bash response came after the kernel-rt one and the feed kept the kernel-rt results.

🤖 Generated with Claude Code

Opening the build feed loaded the page directly in created() and once
more from the buildFeedQuery watcher, and applying a search updated
the filter from the search form and then again from the new route, so
every page load and search sent the same request twice. With heavy
searches the two copies slowed each other down.

Don't send a request while the same one is still running, and ignore
the response of a request that a newer one has replaced, so a slow
search can't overwrite the results of the next one.
@anfimovdm
anfimovdm merged commit bd08a56 into AlmaLinux:master Nov 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants