• Resolved wooq123

    (@wooq123)


    Two of my site’s top 10 largest autoload entries under wp_options are from this plugin. I tried emptying cache and resetting, but the size of these did not change at all. I have Roboto Condensed set to “load early” for 3 font weights, and another detected font set to “don’t load” for every type since it’s a default theme font I’m not using. How can I reduce the size of these? And is it possible to disable autoload?

    omgf_fonts (2nd largest autoload, 31kb)

    omgf_optimized_fonts (8th largest, 9kb)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Long time user, I see ??

    omgf_fonts was a big boy, indeed, and was superseded by omgf_optimized_fonts a couple of releases ago (v4, I believe? Not sure.)

    Either way, you can safely delete omgf_fonts. It’s no longer used. It should’ve been deleted by a migration script years ago, but apparently that failed.

    The size of omgf_optimized_fonts depends on the fonts it finds throughout your site. By comparison, mine is 1.6kb. So, if yours is larger, that means more fonts are found and saved to your server.

    The way to reduce its size is to reduce your theme’s/plugins’ Google Fonts stack. If there’s a bunch you checked don’t load for, you can also try to figure what’s loading it and disable it from there.

    autoload can’t be disabled, because OMGF uses this option to check which fonts are saved to the database.

    Apparently, that migration failed to remove the old option from my sites. Maybe the plugin activation hook can take care of this?

    As for using an autoloaded option, it only makes sense for front-end page generation when the option is needed on every page, or at least the vast majority of pages, but since OMGF uses a file cache, this option is likely only used in the back-end, where it doesn’t need to be autoloaded, just retrieved.

    • This reply was modified 9 months, 2 weeks ago by Gal Baras.
    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    I’ll take a look at it again, Gal. I’ll also check what might’ve gone wrong with the migration script and add it again if needed. Can’t hurt.

    Ma’man! ??

    I can confirm that deleting the old option doesn’t affect anything on my sites, BTW.

    • This reply was modified 9 months, 2 weeks ago by Gal Baras.
    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Haha, no problem!

    So, I’ve done some testing and you’re almost right. The omgf_optimized_fonts option is mostly used in wp-admin, for display purposes, etc. The only time it’s used in the frontend is when OMGF’s optimization process is run in the frontend.

    I’m disabling autoload for it, and making sure with a migration script that this goes for everyone. Marking this as resolved now, as the fix will be included in the next release.

    Oops, no, nevermind. omgf_optimized_fonts is used on every pageload to fetch the URLs of the fonts that need preloading. I went through the others as well, but no gains to be made in terms of disabling autoload, guys. Sorry!

    Always a pleasure, Daan ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Large Autoload database entries’ is closed to new replies.