{"action":"created","issue":{"url":"https://api.github.com/repos/minutebase/ember-inline-svg/issues/15","labels_url":"https://api.github.com/repos/minutebase/ember-inline-svg/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/minutebase/ember-inline-svg/issues/15/comments","events_url":"https://api.github.com/repos/minutebase/ember-inline-svg/issues/15/events","html_url":"https://github.com/minutebase/ember-inline-svg/issues/15","id":56409199,"number":15,"title":"Caching does not work","user":{"login":"buschtoens","id":834636,"avatar_url":"https://avatars.githubusercontent.com/u/834636?v=3","gravatar_id":"","url":"https://api.github.com/users/buschtoens","html_url":"https://github.com/buschtoens","followers_url":"https://api.github.com/users/buschtoens/followers","following_url":"https://api.github.com/users/buschtoens/following{/other_user}","gists_url":"https://api.github.com/users/buschtoens/gists{/gist_id}","starred_url":"https://api.github.com/users/buschtoens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buschtoens/subscriptions","organizations_url":"https://api.github.com/users/buschtoens/orgs","repos_url":"https://api.github.com/users/buschtoens/repos","events_url":"https://api.github.com/users/buschtoens/events{/privacy}","received_events_url":"https://api.github.com/users/buschtoens/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/minutebase/ember-inline-svg/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/minutebase/ember-inline-svg/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-03T17:27:26Z","updated_at":"2015-02-03T22:40:16Z","closed_at":null,"body":"When processing huge or lots of `.svg` files, the build time gets extremely slow with the default configuration. The problem vanishes, when the optimization is disabled: `optimize: false`\r\n\r\nThis has two possible causes:\r\n\r\n* If `svgo` is enabled, the caching doesn't work properly.\r\n* The caching doesn't work at all.\r\n\r\nExpected behaviour: Each `.svg` file is tracked individually and *only* re-processed, if it actually changes.\r\n\r\nI will look into this. Originally reported in #14."},"comment":{"url":"https://api.github.com/repos/minutebase/ember-inline-svg/issues/comments/72751476","html_url":"https://github.com/minutebase/ember-inline-svg/issues/15#issuecomment-72751476","issue_url":"https://api.github.com/repos/minutebase/ember-inline-svg/issues/15","id":72751476,"user":{"login":"rlivsey","id":3740,"avatar_url":"https://avatars.githubusercontent.com/u/3740?v=3","gravatar_id":"","url":"https://api.github.com/users/rlivsey","html_url":"https://github.com/rlivsey","followers_url":"https://api.github.com/users/rlivsey/followers","following_url":"https://api.github.com/users/rlivsey/following{/other_user}","gists_url":"https://api.github.com/users/rlivsey/gists{/gist_id}","starred_url":"https://api.github.com/users/rlivsey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlivsey/subscriptions","organizations_url":"https://api.github.com/users/rlivsey/orgs","repos_url":"https://api.github.com/users/rlivsey/repos","events_url":"https://api.github.com/users/rlivsey/events{/privacy}","received_events_url":"https://api.github.com/users/rlivsey/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T22:40:16Z","updated_at":"2015-02-03T22:40:16Z","body":"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?\r\n\r\nMaybe instead of compiling down to the one registry file, we compile a JS file per SVG which exports the SVG string:\r\n\r\n```\r\n// /svgs/path/to/svg.js\r\nexport default \"the optimized SVG string here\";\r\n```\r\n\r\nThen in the helper we can do something [similar to ember-load-initializers](https://github.com/ember-cli/ember-load-initializers/blob/master/ember-load-initializers.js#L14) \r\nto require the SVG as needed."}}