Comments (8)
Hey @MaxGiting, I think you might have missed the caching section here? https://github.com/blade-ui-kit/blade-icons#caching
from blade-icons.
@driesvints Thanks for the quick reply! I should have mentioned it in the original issue. I have caching turned on and still see the time difference.
from blade-icons.
@MaxGiting that's very odd. I'll try out your repo as soon as I find some time.
from blade-icons.
@driesvints thank you. I have simplified the original issue as caching removed the differences on 1st and subsequent page loads. But yes the difference between blade component and @svg still exists.
from blade-icons.
Just had a quick look into this.
When using the blade component, most of the time is spent in the following method....
https://github.com/laravel/framework/blob/b9203fca96960ef9cd8860cb4ec99d1279353a8d/src/Illuminate/View/Concerns/ManagesComponents.php#L87-L109
Shared equally between this line...
https://github.com/laravel/framework/blob/b9203fca96960ef9cd8860cb4ec99d1279353a8d/src/Illuminate/View/Concerns/ManagesComponents.php#L97
and. this line....
https://github.com/laravel/framework/blob/b9203fca96960ef9cd8860cb4ec99d1279353a8d/src/Illuminate/View/Concerns/ManagesComponents.php#L104
from blade-icons.
I managed to reproduce this with your repo @MaxGiting, thank you. However, I did not figure out the root cause of this even though with @JayBizzle indications.
I have to say, that I find the current differences in speed to not be overly dramatic. I use Blade Icons on several projects, and haven't experienced much slowness after we implemented icon caching. Therefor, I won't be taking any action here right now. However, should anyone find the root cause of this, I'd very much appreciate a PR. Otherwise, if this is really a concern for you, I suggest to use the svg helper or directives for now.
Thanks
from blade-icons.
I experienced the same when using the components. Even with caching, requests where around 130 ms slower with the font awesome icons. Disabled components and switched to the svg helper and the difference was really noticeable.
Am I correct in that when using the svg helper it has no impact on performance? Since blade views are created and cached in production?
Thanks for this package @driesvints 👍
from blade-icons.
Am I correct in that when using the svg helper it has no impact on performance? Since blade views are created and cached in production?
Not entirely sure if it's "no impact" but it's far less than components apparently.
from blade-icons.
Related Issues (20)
- Cannot register icon set HOT 3
- Re-use icons HOT 4
- Installation with Sage 10 theme HOT 2
- Unknown Blade component HOT 1
- How Can I Use "wire:click" with @svg Syntax? HOT 3
- "defer" attribute fails HOT 3
- php artisan icons:cache Does not work on vapor as vapor do not have those write access to those dir HOT 1
- Duplicate attibutes HOT 3
- Svg by name "home" from set "default" not found HOT 3
- Helper mistakes a blade component for an svg HOT 5
- Icons in subdirectories and `Unable to locate a class or view for component` HOT 7
- JavaScript code is not working for getting icon from JS - 'return <svg><use href="#icon-my-custom-hash"></use></svg>' HOT 1
- Error after installation HOT 7
- Bit confused on install instructions -- icons not showing up HOT 4
- Website Demo: Unable to Retrieve Icons through Search HOT 1
- Icon search is broken on the web site HOT 1
- How to download initial svg files into the correct folder? HOT 1
- Can't use blade-uit kit icons in laravel 11 HOT 2
- How to overwrite settings from a third party icon set?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blade-icons.