{"action":"created","issue":{"url":"https://api.github.com/repos/jkphl/svg-sprite/issues/245","repository_url":"https://api.github.com/repos/jkphl/svg-sprite","labels_url":"https://api.github.com/repos/jkphl/svg-sprite/issues/245/labels{/name}","comments_url":"https://api.github.com/repos/jkphl/svg-sprite/issues/245/comments","events_url":"https://api.github.com/repos/jkphl/svg-sprite/issues/245/events","html_url":"https://github.com/jkphl/svg-sprite/issues/245","id":256480362,"number":245,"title":"Consider removing vinyl dependency","user":{"login":"ming-codes","id":706212,"avatar_url":"https://avatars1.githubusercontent.com/u/706212?v=4","gravatar_id":"","url":"https://api.github.com/users/ming-codes","html_url":"https://github.com/ming-codes","followers_url":"https://api.github.com/users/ming-codes/followers","following_url":"https://api.github.com/users/ming-codes/following{/other_user}","gists_url":"https://api.github.com/users/ming-codes/gists{/gist_id}","starred_url":"https://api.github.com/users/ming-codes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ming-codes/subscriptions","organizations_url":"https://api.github.com/users/ming-codes/orgs","repos_url":"https://api.github.com/users/ming-codes/repos","events_url":"https://api.github.com/users/ming-codes/events{/privacy}","received_events_url":"https://api.github.com/users/ming-codes/received_events","type":"User","site_admin":false},"labels":[{"id":79060373,"url":"https://api.github.com/repos/jkphl/svg-sprite/labels/wontfix","name":"wontfix","color":"ffffff","default":true}],"state":"closed","locked":false,"assignee":{"login":"jkphl","id":4446936,"avatar_url":"https://avatars1.githubusercontent.com/u/4446936?v=4","gravatar_id":"","url":"https://api.github.com/users/jkphl","html_url":"https://github.com/jkphl","followers_url":"https://api.github.com/users/jkphl/followers","following_url":"https://api.github.com/users/jkphl/following{/other_user}","gists_url":"https://api.github.com/users/jkphl/gists{/gist_id}","starred_url":"https://api.github.com/users/jkphl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkphl/subscriptions","organizations_url":"https://api.github.com/users/jkphl/orgs","repos_url":"https://api.github.com/users/jkphl/repos","events_url":"https://api.github.com/users/jkphl/events{/privacy}","received_events_url":"https://api.github.com/users/jkphl/received_events","type":"User","site_admin":false},"assignees":[{"login":"jkphl","id":4446936,"avatar_url":"https://avatars1.githubusercontent.com/u/4446936?v=4","gravatar_id":"","url":"https://api.github.com/users/jkphl","html_url":"https://github.com/jkphl","followers_url":"https://api.github.com/users/jkphl/followers","following_url":"https://api.github.com/users/jkphl/following{/other_user}","gists_url":"https://api.github.com/users/jkphl/gists{/gist_id}","starred_url":"https://api.github.com/users/jkphl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkphl/subscriptions","organizations_url":"https://api.github.com/users/jkphl/orgs","repos_url":"https://api.github.com/users/jkphl/repos","events_url":"https://api.github.com/users/jkphl/events{/privacy}","received_events_url":"https://api.github.com/users/jkphl/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-09-10T02:40:09Z","updated_at":"2018-03-17T18:30:46Z","closed_at":"2018-03-17T18:30:46Z","author_association":"NONE","body":"This is my code.\r\n\r\n```js\r\nconsole.time('read');\r\nconsole.time('stat');\r\nlet file = fs.readFileSync(filePath);\r\nconsole.timeEnd('stat');\r\nspriter.add(new File({\r\n  path: filePath,\r\n  base: inputPath,\r\n  contents: file\r\n}));\r\nconsole.timeEnd('read');\r\n```\r\n\r\nThis is the result.\r\n\r\n```\r\nstat: 0.134ms\r\nread: 7.260ms\r\n```\r\n\r\nCreating that vinyl object is 55x slower than just reading the content."},"comment":{"url":"https://api.github.com/repos/jkphl/svg-sprite/issues/comments/373942267","html_url":"https://github.com/jkphl/svg-sprite/issues/245#issuecomment-373942267","issue_url":"https://api.github.com/repos/jkphl/svg-sprite/issues/245","id":373942267,"user":{"login":"jkphl","id":4446936,"avatar_url":"https://avatars1.githubusercontent.com/u/4446936?v=4","gravatar_id":"","url":"https://api.github.com/users/jkphl","html_url":"https://github.com/jkphl","followers_url":"https://api.github.com/users/jkphl/followers","following_url":"https://api.github.com/users/jkphl/following{/other_user}","gists_url":"https://api.github.com/users/jkphl/gists{/gist_id}","starred_url":"https://api.github.com/users/jkphl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkphl/subscriptions","organizations_url":"https://api.github.com/users/jkphl/orgs","repos_url":"https://api.github.com/users/jkphl/repos","events_url":"https://api.github.com/users/jkphl/events{/privacy}","received_events_url":"https://api.github.com/users/jkphl/received_events","type":"User","site_admin":false},"created_at":"2018-03-17T18:30:46Z","updated_at":"2018-03-17T18:30:46Z","author_association":"OWNER","body":"@ming-codes Sorry for the late reply!\r\n\r\nI understand your concerns. However, getting rid of Vinyl doesn't look like an option to me. In fact, I removed all the file reading and writing code from *svg-sprite* at some point in the past to make it more independent and enable e.g. Gulp support. *svg-sprite* is e.g. used by [gulp-svg-sprite](https://github.com/jkphl/gulp-svg-sprite) which relies on passing around streams (/ Vinyl objects). Also, *svg-sprite* is meant to produce multiple files at almost arbitrary locations on the file system. Some of these locations depend on the original location of the source SVGs (directory structure), so just passing in the file contents is not sufficient. "}}
{"actor":{"display_login":"jkphl"}}