Viewing 6 replies - 1 through 6 (of 6 total)
  • WP Gallery Custom Links uses regular expressions to swap in the custom links, and regular expressions tend to be a little on the expensive side. Unfortunately, I’m not sure there’s a reliable way to keep all the same functionality without regular expressions – to my knowledge, WordPress doesn’t provide gallery hooks more specific than “large single chunk of HTML for the whole gallery” (ie no hooks for individual images). If you or any other developer you know would like to review the code for suggestions on how to improve performance, I’m definitely open to ideas, as I know large galleries can cause issues. ??

    Off the top of my head, the plugin loops over all possible image sizes looking for those urls to replace, and it may be possible to limit that to the setting on the gallery to remove some of those iterations, which I’ve been meaning to look into for a while and haven’t gotten around to yet. I’ll see if maybe I can make that modification in the next couple of days, and hopefully that may help you a bit, but the regexes in general are still probably the biggest issue.

    Try version 1.10.3 that I just pushed out – I changed the default default target from “_self” to “do not change” to reduces the number of regexes it needs to run on each item. Hopefully that should help at least a bit with performance.

    Thread Starter Mike Zielonka

    (@mikezielonka)

    Thanks for the update. It’s super awesome of you to refactor it a bit for me.

    I’ll push the update and run some memory tests early this week. ??

    PS – Let me know how I can send you a coffee. ??

    Thread Starter Mike Zielonka

    (@mikezielonka)

    the speed is way better!!!!!! down from 20secs to 1s on the query.

    Thank you!!!

    let me know how I can send you a coffee. ??

    Feel free to tweet me @mikezielonka

    No coffee necessary ?? But if you do feel inclined to donate anyway, there’s a button on this page:

    https://fourlightsweb.com/portfolio/wp-gallery-custom-links-plugin

    Thread Starter Mike Zielonka

    (@mikezielonka)

    Then maybe sone ice cream. ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘large galleries’ is closed to new replies.