{"id":21871811,"url":"https://github.com/ericmorand/react-20177","last_synced_at":"2026-05-15T13:01:49.369Z","repository":{"id":137361359,"uuid":"311084389","full_name":"ericmorand/react-20177","owner":"ericmorand","description":"Reproduction repository for React issue #20177","archived":false,"fork":false,"pushed_at":"2020-11-08T15:58:13.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T18:56:49.521Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericmorand.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-08T14:46:26.000Z","updated_at":"2020-11-08T15:58:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"0200db58-488e-4a38-a69b-fb57e58e5057","html_url":"https://github.com/ericmorand/react-20177","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ericmorand/react-20177","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Freact-20177","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Freact-20177/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Freact-20177/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Freact-20177/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericmorand","download_url":"https://codeload.github.com/ericmorand/react-20177/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Freact-20177/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33067476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T06:15:29.192Z","updated_at":"2026-05-15T13:01:49.337Z","avatar_url":"https://github.com/ericmorand.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Issue #20177\n\n## Usage\n\n* `time npx node reference.js`: bundle the application with only the production sources of React and React DOM (see `reference.js` for how it's done)\n* `time npx browserify src/index.js \u003e bundle.js`: bundle the application with Browserify\n* `time npx browserify src/index.js  -t [envify purge --NODE_ENV production --global] \u003e bundle.js`: bundle the application with Browserify + envify\n* `time npx browserify src/index.js  -t [envify purge --NODE_ENV production --global] -t [uglifyify --global] \u003e bundle.js`: bundle the application with Browserify + envify + ulgifyify\n\n## Expected result\n\nAll above scripts should execute in the same order of magnitude as the `reference` script. On the computer I'm using to write this document, it means:\n\n```bash\nreal    0m0,853s\nuser    0m1,043s\nsys     0m0,069s\n```\n\n## Actual result\n\nScripts execution time are longer than the `reference` script:\n\n* Browserify:\n\n```bash\nreal    0m2,439s\nuser    0m2,936s\nsys     0m0,243s\n```\n\n* Browserify + envify:\n\n```bash\nreal    0m2,876s\nuser    0m3,586s\nsys     0m0,349s\n```\n\n* Browserify + envify + ulgifyify:\n\n```bash\nreal    0m5,429s\nuser    0m8,099s\nsys     0m0,331s\n```\n\n## Consolidated results\n\n| script  | difference to reference (user) |\n|---|---|\n| Browserify | 197% slower  |\n| Browserify + envify | 244% slower  |\n| Browserify + envify + ulgifyify | 676% slower  |\n\n## Why it is happening\n\nIt is happening because both `node_modules/react/index.js` and `node_modules/react-dom/index.js` exports their respective development and production modules.\n\n## Why it is an issue\n\nThis is an issue because it hinders the performance of the bundle process:\n\n* If nothing is done at the bundler level to remove dead code paths, then both the development and production sources of React and React DOM are bundled. React DOM development source being around 900KB, bundling it comes with a huge cost of I/O and parsing.\n* If plugins are used to remove dead code paths (like envify + uglifyify), then a parsing is done by the plugins to detect dead code paths which will hinder performances event more. Notice for example that the bundling time of the Browserify + Envify script is longer than the one with only Browserify. Which means that trying to solve the issue by removing dead code paths actually leads to an even longer bundling duration. This is expected since not only do envify doesn't prevent the unwanted sources from being included in the bundle, but it adds a parsing step to the mix.\n\nIn any case, bundling performances will be lower than having only the proper React and React DOM sources exported.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmorand%2Freact-20177","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericmorand%2Freact-20177","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmorand%2Freact-20177/lists"}