-
AuthorPosts
-
February 10, 2021 at 8:14 pm #1279600
Ruud Laan
GuestHi,
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-urlI 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,
RuudFebruary 12, 2021 at 1:50 pm #1280023Hey Ruud,
Thanks for contacting us and for the information!
We will forward your message to our devs :)
Thanks again!
Regards,
YigitFebruary 12, 2021 at 3:03 pm #1280056Ruud Laan
GuestHi Yigit,
Thanks for forwarding the information to the devs 👍
RuudFebruary 12, 2021 at 3:45 pm #1280067Hi,
Not at all!
Please let us know if there is anything else we can do and enjoy your weekend! :)
Best regards,
YigitFebruary 12, 2021 at 6:17 pm #1280124Hi 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,
YigitFebruary 15, 2021 at 3:00 pm #1280556Ruud Laan
GuestHi Yigit,
Thanks for the feedback from the devs.
I will have a look at the new code and check if it works.Thanks,
RuudFebruary 15, 2021 at 4:09 pm #1280572 -
AuthorPosts
- You must be logged in to reply to this topic.
