GithubHelp home page GithubHelp logo

Comments (4)

buschtoens avatar buschtoens commented on June 11, 2024

From the broccoli-caching-writer docs:

Adds a thin caching layer based on the computed hash of the input tree. If the input tree has changed, the updateCache method will be called, otherwise (input is the same) the results of the last updateCache call will be used instead.

So, seems like the whole input tree is re-processed, if even only one file changes.

from ember-inline-svg.

buschtoens avatar buschtoens commented on June 11, 2024

I submitted an issue in broccoli-caching-writer.

I believe that caching files individually is probably out of scope and we will have to find an alternative or ship our own. I added the help-wanted label for this reason.

from ember-inline-svg.

buschtoens avatar buschtoens commented on June 11, 2024

We can probably use broccoli-filter. I'll branch off in my fork and test something out.

broccoli-coffee is a good starting point.

from ember-inline-svg.

rlivsey avatar rlivsey commented on June 11, 2024

Random (possibly crazy) thought, we're currently compiling n:1 which means we don't get the caching for free, could we compile 1:1 instead?

Maybe instead of compiling down to the one registry file, we compile a JS file per SVG which exports the SVG string:

// /svgs/path/to/svg.js
export default "the optimized SVG string here";

Then in the helper we can do something similar to ember-load-initializers to require the SVG as needed.

from ember-inline-svg.

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.