Kirki: Output to External CSS and Performance Issues

Created on 16 May 2017  路  7Comments  路  Source: kirki-framework/kirki

Issue description:

We have a lot of CSS output generated with Kirki. Seems like it's causing perfomance issues though:

applicationframehost_2017-05-16_20-46-04

applicationframehost_2017-05-16_20-49-37

I've noticed, that there's CSS To File module in the latest version. Could you please provide any directions on how to use it?

I assume, it will help decrease the time of inline styles generation process.

Version used:

Develop branch as of End of April 2017.

Using theme_mods or options?

theme_mods

Most helpful comment

I believe that last commit fixed the issue.
Can you please verify?

Stylesheet should now be updated on save properly. 馃憤

All 7 comments

Try this:

add_filter( 'kirki/dynamic_css/method', function() {
    return 'file';
});

Still under testing but so far seems to be working fine. 馃憤
And yes, it should make those processed go away.

@aristath Thanks a lot.

The output to external file seems to be working fine. However I can't get Kirki to overwrite the file. Once saved, it doesn't get updated :(

Any hints on this?

I've just tried it on remote server and updating the external file seems to be working just fine. There must be an issue with the localhost. I'm running VVV on Windows.

@aristath Sorry for spamming. Just tested it further on the remote server. The styles.css doesn't get updated either :( Before changing something in Customizer, I have to remove the file manually and then Kirki is able to recreate it with the new customizations. Could you please look into this?

I believe that last commit fixed the issue.
Can you please verify?

Stylesheet should now be updated on save properly. 馃憤

@aristath I've just tried the fix, doesn't seem to be working either :( The file gets created on customize_save_after, but it's not overwritten if it already exists. Tried to grant 777 permissions to the folder and the file to no avail.

Sorry, it was the browser cache. The feature is working fine! Thanks a lot.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  5Comments

hellor0bot picture hellor0bot  路  3Comments

fakrulislam picture fakrulislam  路  3Comments

2one2 picture 2one2  路  3Comments

ravishakya picture ravishakya  路  7Comments