Excessive Load Time from icons2.woff2 File

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Excessive Load Time from icons2.woff2 File

This topic contains 6 replies, has 2 voices, and was last updated by

 
Participant
1 year, 7 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #27883

    Participant

    Hi Ernest,

    I hope you’re doing well!

    I’d greatly appreciate if you can reply fast on this, as it directly relates to a current project (we’re working on cutting our load times).

    I’ve discovered that a certain file from Ajax Search Pro is greatly adding to our load times.

    It is this file:
    /wp-content/plugins/ajax-search-pro/css/fonts/icons/icons2.woff2

    For some reason this one file which is only 2.3 KB is taking about 6 seconds to load. According to GTmetrix the load time is all taken up by blocking.

    This file is obviously used for fonts, but why would it take so long for blocking? Do you know anything we can do to correct this?

    We’re in the middle of a major effort here to cut down our load times, and this one file is causing a major problem. I hope you can shed some light on this.

    All my best!

    ~ Michael

    #27884

    Hi Michael,

    This is definitely not a plugin related issue, it is only a very common asset file, loaded via a @font-face CSS method.
    I suggest looking up mod_rewrite rules, either in the server configuration or in the .htaccess file.
    I suspect, that there might be a permalink related rule defined somewhere, and the file link pattern is recognized as a possible permalink to a different type of content, and the server might be trying to process that, and then fetches the file, when that is not found.
    You can try opening the file directly in your browser to see if there is any redirection loop occuring, or it is loaded immediately.

    Unfortunately there is nothing I can do from the plugins perspective, the file is very small, the contents are correct, the loading method is also correct.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #27885

    Participant

    Hi Ernest,

    Thank you for the quick response!

    I did a quick check and there is indeed a rewrite rule for this that is used by W3 Total Cache for the Browser Caching functionality. I’ve been experimenting with W3 Total Cache, and the plan was probably to only use it for browser caching.

    I’ll do a quick test here to disable these rules completely, and see if it makes a difference. This will take me a few minutes as it requires a full deployment. I’ll message back here shortly with the results…

    ~ Michael

    #27886

    Participant

    Ok, so bad news. I completely disabled W3 Total Cache and removed all the rewrite rules from .htaccess, and this made no difference!

    Please look at the screenshot I’ve attached here. As you can see this file is taking 6.1 seconds just for blocking.

    You know, we already load FontAwesome elsewhere. I’m wondering if we even need to load this at all from within ASP…

    ~ Michael

    Attachments:
    You must be logged in to view attached files.
    #27892

    Participant

    Is there a way I can completely disable this file from loading? We may not actually need this…

    #27893

    Blocking means, that the resource is waiting for a connection. Usually it happens when there are already too many connections to the server, and previous connections need to close first. The actual loading time of the asset is only 30.7 ms, which sounds about right.
    The reason for the block can be different, it is up to the browser to decide which assets load first. I can imagine that it decides to load up other crucial asset items first, and not to bother with this font, until it is neccessary. I think in your case only the settings “tick” icons are rendered, which are not visible, so the browser probably decides to block that until neccessary.
    If you test this on a real world browser, the results will be probably different on each one. This is not font awesome though, it is only a small subset of custom generated icons.

    I do not recommend, but you can completely remove this from wp-content/plugins/ajax-search-pro/includes/classes/actions/class-asp-stylesheets.php file, lines 114-124. It will probably cause issues though.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #27896

    Participant

    Hi Ernest,

    Thank you for explaining to me what blocking is all about. That was helpful!

    From what you’ve said there is actually no problem here. I think this is probably only affecting the stats in GTmetrix. I’ve learned to take the metrics in GTmetrix with a grain of salt, as they never appear to be UX time-frames. By comparison the total times provided in Pingdom tend to be more what the user actually expreriences. I use GTmetrix because it is very detailed, and helps to identify problems.

    I’m in the middle of a lot of performance related work, so when I saw that 6 second blocking I assumed it was part of the problem. Thanks for clearing this up!

    The only icons that we’re using are the checkmark, search icon, and settings icon. You know, I think there is room for a feature here. Many people already load FontAwesome in one version or another. I often see it loaded by multiple plugins. It would be a good settings option to disable it from loading in ASP when it is already loaded elsewhere. I’ve seen plugins offer options like this to avoid loading fonts multiple times.

    I may experiment here with removing the font file just to see what happens. But either way, this would be a great option to have in settings.

    Food for thought!

    Thank you as always for the fast help… =)

    ~ Michael

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.