{"id":13821855,"url":"https://github.com/inkdropapp/electron-v8snapshots-example","last_synced_at":"2025-08-03T06:05:48.134Z","repository":{"id":73148290,"uuid":"286650914","full_name":"inkdropapp/electron-v8snapshots-example","owner":"inkdropapp","description":"An example for using custom v8 snapshots in an Electron app","archived":false,"fork":false,"pushed_at":"2021-06-05T04:04:47.000Z","size":639,"stargazers_count":62,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T05:39:40.045Z","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/inkdropapp.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}},"created_at":"2020-08-11T05:08:21.000Z","updated_at":"2025-03-26T13:31:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"47a2ba5e-dfeb-42ad-b865-3d5b943690da","html_url":"https://github.com/inkdropapp/electron-v8snapshots-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/inkdropapp/electron-v8snapshots-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkdropapp%2Felectron-v8snapshots-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkdropapp%2Felectron-v8snapshots-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkdropapp%2Felectron-v8snapshots-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkdropapp%2Felectron-v8snapshots-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inkdropapp","download_url":"https://codeload.github.com/inkdropapp/electron-v8snapshots-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkdropapp%2Felectron-v8snapshots-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268500608,"owners_count":24260163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-08-04T08:01:30.985Z","updated_at":"2025-08-03T06:05:48.019Z","avatar_url":"https://github.com/inkdropapp.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Example for using custom v8 snapshots in an Electron app\n\nGenerate a custom v8 snapshots using [electron-link](https://github.com/atom/electron-link) and [mksnapshot](https://github.com/electron/mksnapshot).\n\nRead [the blog article](https://blog.inkdrop.info/how-to-make-your-electron-app-launch-1000ms-faster-32ce1e0bb52c) for detail.\n\n## How to install\n\n```sh\nELECTRON_CUSTOM_VERSION=13.0.1 npm install\n```\n\n## How it works\n\n### Generate v8 snapshots\n\nRun the following command:\n\n```sh\nnpm run generate-v8-snapshots\n```\n\nIt generates v8 snapshots containing `react` and `react-dom` libraries from `\u003cPROJECT_DIR\u003e/snapshot.js`.\nYou should get `v8_context_snapshot.bin` in the project directory.\n\n### Copy the snapshots into Electron\n\n```sh\nnpm run copy-v8-snapshots\n```\n\nIt copies `snapshot_blob.bin` and `v8_context_snapshot.bin` files to the Electron's binary.\n\n### Start the Electron app\n\nThe electron app will load those libraries from the snapshots.\nYou should get a window like so:\n\n![ss](./images/ss.png)\n\nAs you can see, `react` and `react-dom` libraries are loaded from the v8 snapshot cache.\n\n## Credit\n\nCreated by Takuya Matsuyama ([Twitter](https://twitter.com/inkdrop_app)) for his work called [Inkdrop](https://www.inkdrop.app/), a cross-platform Markdown note-taking app.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finkdropapp%2Felectron-v8snapshots-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finkdropapp%2Felectron-v8snapshots-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finkdropapp%2Felectron-v8snapshots-example/lists"}