Giter Site home page Giter Site logo

Comments (8)

driesvints avatar driesvints commented on June 9, 2024

Hey @MaxGiting, I think you might have missed the caching section here? https://github.com/blade-ui-kit/blade-icons#caching

from blade-icons.

MaxGiting avatar MaxGiting commented on June 9, 2024

@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.

driesvints avatar driesvints commented on June 9, 2024

@MaxGiting that's very odd. I'll try out your repo as soon as I find some time.

from blade-icons.

MaxGiting avatar MaxGiting commented on June 9, 2024

@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.

JayBizzle avatar JayBizzle commented on June 9, 2024

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.

driesvints avatar driesvints commented on June 9, 2024

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.

Erulezz avatar Erulezz commented on June 9, 2024

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.

driesvints avatar driesvints commented on June 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.