-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance of Kadence_Blocks_Svg_Render->render_icons_dynamically #598
Comments
Hey, this function would query custom icons if there are any, which could require requests to the database. On initial hit, this could take milliseconds like you show, but once cached, it should be instant. Are you not seeing this cached? are you not using any caching on your site? |
Hey, I am using custom uploaded svg icons. The slowest database query is not even 1ms long and this function runs 300ms so this is not a database issue. I think this function is slow because of string manipulation or something like that. Can you check how a test site of yours slows down the more custom icons you are using? |
How many custom icons are you using? Are you using a bunch of individual or a set? |
@oakesjosh can you put this on your list to explore some options |
It's from one library set but each one is an individual svg file that I upload individually. |
Hello @benniledl I've just pushed some caching for our icon parsing, which improves performance with repeated use of the same icons. You should see a noticeable improvement with this change; if not, feel free to reach out, and we can take another look. |
Hi @oakesjosh thanks for that! |
@benniledl Are you seeing the same slowdown in real world performance? I don't have the pro version of Code profiler, but in my tests, code profiler is reporting 4 or 5 times slower than the actual performance on the front end. You're welcome to debug, or if it doesn't have any sensitive information, I'd be happy to test on an export of your site. I will take a second look on my end. |
Hello,
I have a Problem that Kadence really slows down my site quite a bit (about 400 ms). I have measured it and found that the slowest function is render_icons_dynamically, this one function alone takes up about 140ms on a page load, so about 35% of the overall time.
I just wanted to ask if you could take a look over this function and see if any performance improvements can be made on it.
The text was updated successfully, but these errors were encountered: