Opened 8 years ago
Last modified 5 years ago
#38782 reviewing defect (bug)
Insert/Edit link scrolling triggers AJAX requests for both (recent and search) rivers
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 4.6.1 |
Component: | Editor | Keywords: | |
Focuses: | ui, performance | Cc: |
Description
I noticed quite a number of insert/edit link related SQL queries. When testing the feature, I have noticed that in case a search keywords is typed into the search field and user scrolls down the results, not only the search river related AJAX is made, but also a recent river triggers an AJAX request.
The behaviour currently looks this way:
1) opening the Insert/Edit link modal triggers following AJAX request:
action: wp-link-ajax
page: 1
2) putting in a keyword to search input triggers following AJAX request:
action: wp-link-ajax
page: 1
search: {keyword}
3) scrolling down the results of the search query produces two AJAX request:
action: wp-link-ajax
page: 2
and
action: wp-link-ajax
page: 2
search: {keyword}
4) as the search AJAX for page 2 returned false
, scrolling up produces following AJAX only:
action: wp-link-ajax
page: 3
5) removing the keyword form the search input user is taken to the recent river which now already contains 4 pages of results
Since this behaviour is producing a lot of SQL queries with an increasing offset, those queries are getting slow with increasing dataset. Shouldn't the implementation be triggering AJAX requests for visible river only?
Attachments (2)
Change History (5)
This ticket was mentioned in Slack in #core by noisysocks. View the logs.
5 years ago
#2
@
5 years ago
- Milestone changed from Awaiting Review to 5.4
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
#3
@
5 years ago
- Milestone changed from 5.4 to Future Release
Hi,
With 5.4 Beta 3 approaching and the Beta period reserved for bugs introduced during the cycle, this is being moved to Future Release. If any maintainer or committer feels this should be included or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.
Patch for querying results for visible river only