Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin area speed of loading #1054

Closed
lordmatt opened this issue Sep 12, 2019 · 3 comments
Closed

Admin area speed of loading #1054

lordmatt opened this issue Sep 12, 2019 · 3 comments
Milestone

Comments

@lordmatt
Copy link

Just an FYI on my own testing. I installed on localhost and then left it alone for about four weeks. When I came to view the admin area again the load time was painfully slow. Taking minutes to reach the loading bar after which things shuffled along at a slow but acceptable pace.

  • WP: 5.2.3
  • OS: ubuntu 16.04 - 64-bit - 16 GiB RAM
  • mysqli: 5.7.27-0ubuntu0.16.04.1
  • Server architecture: Linux 4.4.0-159-generic x86_64
  • Web server: Apache/2.4.18 (Ubuntu)
  • PHP: 7.0.33-0ubuntu0.16.04.6 (Supports 64bit values)

My guess was that it used the call to load the admin area to run background tasks. However, there was still a substantial delay on the next viewing of the admin area.

I profiled load time with Chrome:

  • Queued at 0
  • Started at 4.37 ms
  • Queueing 4.37 ms
  • Stalled 2.35 ms
  • DNS Lookup 6 μs
  • Initial connection 0.11 ms
  • Request sent 58 μs
  • Waiting (TTFB) 38.33 s
  • Content Download 13.61 s
  • Total time: 51.95 s

Overview: Finish 2.9 min; DomContentLoaded 52.26s; Load: 52.55s

@AramZS
Copy link
Member

AramZS commented Oct 31, 2019

@lordmatt is this the standard admin area or the PressForward admin area and does your system rely on standard wp-cron or do you have a traditional cron task hitting your wp-cron?

@boonebgorges
Copy link
Contributor

I've had extensive problems with pageload time in the admin, and in my tests I've narrowed it down to the show_embed() support:

$embed = $this->show_embed( $id_for_comments );

public function show_embed( $id_for_comments ) {

$oembed = wp_oembed_get( $item_link );

See #888, which I think is the same issue.

I'm not 100% sure what this embed call is supposed to do - see a79f70d for a description in the commit message - but at the very least, the wp_oembed_get() response should be cached aggressively.

boonebgorges added a commit that referenced this issue Oct 2, 2021
The week-long cache increases load speed on Nominated and All Content pages.

See #888, #1054.
@boonebgorges boonebgorges added this to the 5.4.0 milestone Dec 16, 2022
boonebgorges added a commit that referenced this issue Feb 24, 2023
We do this by removing the `src` attributes from image tags
when building Reader markup, stashing the URLs in a `data-src` attribute.
Then, when the modal is opened, we swap the `src` attributes back in.

This dramatically improves Reader performance when loading a list
of items that contains many images, especially those that are
loaded from servers with latency issues.

See #1114, #1054.
boonebgorges added a commit that referenced this issue Feb 26, 2023
… non-embeddable URLs.

A feature was added in a79f70d that enabled
an oEmbed-powered preview if the nominated/feed URL was an oEmbed-capable URL
(as in, say, a YouTube URL). But the implementation was written in such
a way that *all* submitted item URLs were checked for oEmbed periodically.
Generally, this is not necessary: we can prescreen by checking against
WP's list of registered handlers.

See #1054. See #888.
@boonebgorges
Copy link
Contributor

Since roughly version 5.2.0, we've made a number of changes that have had a huge effect on All Content/Nominated load time:

Both All Content and Nominated load in 1-2 seconds, while previously they took from 10-30 seconds.

Nominated before:
nominated-before

Nominated after:
nominated-after

All Content before:
all-content-before

All Content after:
all-content-after

As such, I'm going to mark this ticket complete. Further refinements will be handled in separate tickets.

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

No branches or pull requests

3 participants