{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/168","labels_url":"https://api.github.com/repos/webpack/webpack/issues/168/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/168/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/168/events","html_url":"https://github.com/webpack/webpack/issues/168","id":27424146,"number":168,"title":"Performance of webpack-dev-server with source maps","user":{"login":"KidkArolis","id":324440,"avatar_url":"https://avatars.githubusercontent.com/u/324440?v=3","gravatar_id":"","url":"https://api.github.com/users/KidkArolis","html_url":"https://github.com/KidkArolis","followers_url":"https://api.github.com/users/KidkArolis/followers","following_url":"https://api.github.com/users/KidkArolis/following{/other_user}","gists_url":"https://api.github.com/users/KidkArolis/gists{/gist_id}","starred_url":"https://api.github.com/users/KidkArolis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KidkArolis/subscriptions","organizations_url":"https://api.github.com/users/KidkArolis/orgs","repos_url":"https://api.github.com/users/KidkArolis/repos","events_url":"https://api.github.com/users/KidkArolis/events{/privacy}","received_events_url":"https://api.github.com/users/KidkArolis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/webpack/webpack/milestones/6","html_url":"https://github.com/webpack/webpack/milestones/1.0","labels_url":"https://api.github.com/repos/webpack/webpack/milestones/6/labels","id":542363,"number":6,"title":"1.0","description":"\r\n\r\n<!---\r\n@huboard:{\"order\":3.5}\r\n-->\r\n","creator":{"login":"sokra","id":1365881,"avatar_url":"https://avatars.githubusercontent.com/u/1365881?v=3","gravatar_id":"","url":"https://api.github.com/users/sokra","html_url":"https://github.com/sokra","followers_url":"https://api.github.com/users/sokra/followers","following_url":"https://api.github.com/users/sokra/following{/other_user}","gists_url":"https://api.github.com/users/sokra/gists{/gist_id}","starred_url":"https://api.github.com/users/sokra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokra/subscriptions","organizations_url":"https://api.github.com/users/sokra/orgs","repos_url":"https://api.github.com/users/sokra/repos","events_url":"https://api.github.com/users/sokra/events{/privacy}","received_events_url":"https://api.github.com/users/sokra/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":13,"state":"closed","created_at":"2014-01-21T10:30:20Z","updated_at":"2014-02-24T14:13:57Z","due_on":"2014-01-31T08:00:00Z","closed_at":"2014-02-24T14:13:57Z"},"comments":10,"created_at":"2014-02-12T10:42:31Z","updated_at":"2015-04-08T06:54:22Z","closed_at":"2014-02-19T21:44:07Z","body":"I'm working on this larg(ish) project where we currently use AMD. It works all right, we don't build the project in development and load each module individually. It takes about ~2.5 seconds to load the page with ~420 modules/templates.\r\n\r\nI'm exploring switching to webpack (which so far looks amazing) for all the benefits that would add. I have our entire existing project building with webpack with no modifications to the project, which is awesome.\r\n\r\nIt takes 14s to build the project, but if I use `webpack-dev-server`, the rebuilds are impressively fast ~1s.\r\n\r\nHowever, if I turn on `devtool: \"source-map\"`, the rebuilds then take ~4s which is slower than loading all modules individually with Require.js where source maps are not needed.\r\nI've tried using `devtool: \"eval\"` and that's fast, but it's not .. a perfect sourcemap (e.g. requires are all numbers now and `pathInfo: true` doesn't seem to work for me).\r\n\r\nSo, my question really is, why does sourcemap slowdown rebuilds so much and how could I try to go around it. E.g. Should I try to make more smaller chunks? Should I try to move some of the shared dependencies from the chunks into the entry bundle? Am I doing something wrong with having so many megabytes of JavaScript?\r\n\r\nHere's my current output just to give you the idea of the size of the project. \r\n\r\n```\r\nVersion: webpack 1.0.0-rc3\r\nTime: 14180ms\r\n      Asset     Size  Chunks             Chunk Names\r\n  bundle.js   985492       0  [emitted]  main       \r\n1.bundle.js   437111       1  [emitted]             \r\n2.bundle.js   552099       2  [emitted]             \r\n3.bundle.js  1848882       3  [emitted]             \r\n4.bundle.js  2413145       4  [emitted] \r\n```\r\n\r\nThat's 5.9MB in total at the moment, even though the unuglified r.js build is 3.8MB. That's because there's a lot of code duplication in chunks 1, 2, 3, 4. I'd like to build all modules that are shared at least once into the parent bundle, but haven't figured how to do that yet."},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/90822771","html_url":"https://github.com/webpack/webpack/issues/168#issuecomment-90822771","issue_url":"https://api.github.com/repos/webpack/webpack/issues/168","id":90822771,"user":{"login":"sokra","id":1365881,"avatar_url":"https://avatars.githubusercontent.com/u/1365881?v=3","gravatar_id":"","url":"https://api.github.com/users/sokra","html_url":"https://github.com/sokra","followers_url":"https://api.github.com/users/sokra/followers","following_url":"https://api.github.com/users/sokra/following{/other_user}","gists_url":"https://api.github.com/users/sokra/gists{/gist_id}","starred_url":"https://api.github.com/users/sokra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokra/subscriptions","organizations_url":"https://api.github.com/users/sokra/orgs","repos_url":"https://api.github.com/users/sokra/repos","events_url":"https://api.github.com/users/sokra/events{/privacy}","received_events_url":"https://api.github.com/users/sokra/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T06:54:22Z","updated_at":"2015-04-08T06:54:22Z","body":"> Switching from source-map to eval-source-map it looks like the CSS source maps are not being bundled by the ExtractTextPlugin. Is it expected? Thanks\r\n\r\nyes.\r\n\r\nwebpack 1.8 now offers an additional SourceMap option which is pretty fast but generates SourceMaps: `devtool: \"cheap-source-map\"` and `devtool: \"cheap-module-source-map\"` (plus `eval-` variants).\r\n\r\nHere is a overview: http://webpack.github.io/docs/configuration.html#devtool"}}