Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1279600
    Ruud Laan
    Guest

    Hi,

    I’m a Codable Expert and was working on client site with Enfold theme.
    While doing so, a particular page caused a huge delay in load time.

    I debugged it to the Avia_is_200 function which uses file_get_contents().

    In this case, the page loaded a .mp4 video, and the function is used to scan for alternatives (.webm, .ogv) and the poster frame files.
    Each request stalled the process for many seconds (up to a minute) on my setup Local (by Flywheel, version 5.9.8).

    I found this (old) link which references a similar issue:
    https://stackoverflow.com/questions/3629504/php-file-get-contents-very-slow-when-using-full-url

    I tried several things, my easiest fix was to use the ‘timeout’ => .5 solution, but that may also yield false negatives on slower systems.

    The PHP version I used is 7.4.1

    Other suggestions on the Stackoverflow thread were to use curl instead.
    I also guess the WP built-in file functions could be of use.

    Hope this helps.

    Thanks,
    Ruud

    #1280023

    Hey Ruud,

    Thanks for contacting us and for the information!

    We will forward your message to our devs :)

    Thanks again!

    Regards,
    Yigit

    #1280056
    Ruud Laan
    Guest

    Hi Yigit,

    Thanks for forwarding the information to the devs 👍
    Ruud

    #1280067

    Hi,

    Not at all!

    Please let us know if there is anything else we can do and enjoy your weekend! :)

    Best regards,
    Yigit

    #1280124

    Hi again Ruud,

    I just heard back from our devs. Could you please replace avia_is_200 function in enfold/framework\php\function-set-avia-frontend.php with this one – https://pastebin.com/hxWfFHBZ and let us know if that solves the issue? :)

    Regards,
    Yigit

    #1280556
    Ruud Laan
    Guest

    Hi Yigit,

    Thanks for the feedback from the devs.
    I will have a look at the new code and check if it works.

    Thanks,
    Ruud

    #1280572

    Hi,

    Thanks so much for your time, Ruud :)

    Best regards,
    Yigit

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.