René's URL Explorer Experiment


Title: Removal of Snapshots support from NS 7.x · Issue #8926 · NativeScript/NativeScript · GitHub

Open Graph Title: Removal of Snapshots support from NS 7.x · Issue #8926 · NativeScript/NativeScript

X Title: Removal of Snapshots support from NS 7.x · Issue #8926 · NativeScript/NativeScript

Description: Reason why we are removing... Reasons for removal: High Support cost (> 800 issues) High dev costs (breaks frequently, OS changes like Mac requires Docker, Arm64 mac... etc) Bugs with Snapshots (snapshots are imperfect; they normally wor...

Open Graph Description: Reason why we are removing... Reasons for removal: High Support cost (> 800 issues) High dev costs (breaks frequently, OS changes like Mac requires Docker, Arm64 mac... etc) Bugs with Snapshots (sn...

X Description: Reason why we are removing... Reasons for removal: High Support cost (> 800 issues) High dev costs (breaks frequently, OS changes like Mac requires Docker, Arm64 mac... etc) Bugs with Snapshots ...

Opengraph URL: https://github.com/NativeScript/NativeScript/issues/8926

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Removal of Snapshots support from NS 7.x","articleBody":"Reason why we are removing...  \r\n\r\nReasons for removal:\r\n- High Support cost (> 800 issues)\r\n- High dev costs (breaks frequently, OS changes like Mac requires Docker, Arm64 mac...  etc)\r\n- Bugs with Snapshots (snapshots are imperfect; they normally work -- but occasionally we have seen issues)\r\n- Having to create additional wrappers to keep native code from being snapshotted; snapshots have to be pure JS.  Meaning plugins can easily break your snapshots, and we are constrained on how to write certain pieces of code.\r\n- Inflates app distribution size \r\n- Inflates app on device size\r\n- Android Only\r\n- On modern devices, snapshots are actually **slower** than having no snapshots.\r\n- Snapshots are not optimizable.  Meaning all running code from inside a snapshot cannot take advantage of many v8 optimization features while running, so their is a constant runtime performance hit. \r\n\r\n\r\nReplaced with Code Cache\r\n- Built into the v8 engine (supported by v8 maintainers), no additional support costs to us at all.\r\n- Faster than Snapshots in every instance except the very first boot.  Very first boot, is slower because it has to build the cache.\r\n- Faster than Snapshots on Slower devices by a wide %.\r\n- Supported on both iOS and Android\r\n- Code-Cache built is native to the device, app space used is considerably less than w/ snapshots\r\n- Not inflating apk/ipk with snapshots for the the different platforms.\r\n- No runtime speed hit, all code is fully optimizable by v8\r\n\r\n\r\n\r\nActual Raw Numbers:   (Lots of numbers)\r\nI used the NS Grocery App under NS 6, because it has multiple screens, and uses Angular and of course snapshots work.   I built all apps as tns --release.     I did NOT uglify nor do --env.production as the idea was to create the slowest possible app with the most JS code easily.   :grinning:\r\n\r\nSo I have a couple different sets of numbers\r\n\r\nApp Sizes\r\n---\r\n\r\nStock App   (no code cache, no snapshots just the app as is)\r\nAPK Size: 22.2m   - Install Size: 7.5m\r\n\r\nCode Cache App\r\nAPK Size: 22.2m - Install Size: 10m (after code cache is built)\r\n\r\nSnapshot App\r\nAPK Size: 28.4m - Install Size: 21m\r\n\r\nAs you can see; not only is the APK w/ snapshots is 27% larger and on disk it actually is way over 200% larger than code cache and almost 300% larger than stock.\r\n\r\n\r\nTime to JS Executed in Milliseconds (on real devices):\r\n---\r\n`Fast` number is on a very fast modern android device (Samsung S9, Android 10), `Slow` number is very old slow device (Samsung A3, Android 5.0.2)  -- All numbers were averaged, took between 5 to 12 samples depending on the variation seen in the numbers).\r\n\r\n| Type | First JS Fast | First JS Slow | Complete JS Fast | Complete JS Slow |\r\n|  -----  | ---------------   | ----------------   | ----------------------- | ------------------------- |\r\n| Stock Application | 467 | 1646 | 835 | 3194 |\r\n| Code Cache First Only | 695 | 2152 | 1100 | 3726 |\r\n| Code Cache All Boots (except first) | 298 | 924 | 673 | 2392 |\r\n| Snapshots | 487 | 1310 | 970 | 2980 |\r\n\r\n\r\nNote: Using Code Cache with Snapshot is even slower than either; because first startup you still have to build the cache & each startup after you have to load in TWO files, the snapshot and the cache; which kills your startup performance.\r\n\r\nExplaining the Numbers:\r\n---\r\n**First JS** means the time for the engine to startup and the point where snapshots / caches have loaded -- this is before anything has loaded, basically the very first line of JS executed.\r\n\r\n**Complete JS** means that the JS has parsed, caches/snapshots have parsed and the app is actually running -- this is when we actually hit the login screen.   (So this is probably the more important number to consider as it is what your clients will think as the speed of your app.)\r\n\r\nSo on a fast device, the stock app will get to the login screen in 835ms, and on a very slow device  3194ms (or 3.194sec).\r\n\r\nA couple interesting things, on a reasonably modern fast device, using snapshots are actually > 16% SLOWER than no snapshots.   However on a slow device the speed difference is around 7% faster.   \r\n\r\nWith Code Cache there is a **performance hit for the very first time** your app runs.  As you can see even on a fast device the hit is 265ms slower (31%) on the first boot than the stock app.   However, every app start after that the speed is 20% faster.   On a slow device this hit is about 16% but again on all the rest of the startups, the speed up is 33% faster than the stock...\r\n\r\n---\r\n\r\nTo us at the TSC, it does not make any sense to continue maintaining complex tooling that as you can see it considerably slower than code cache in all areas except a single app start.\r\n\r\n---\r\nTo enable code cache in NS 6 (Android only):\r\n\r\nEdit the main app/package.json and add the key \r\n`\"codeCache\": \"true\"`\r\nto the android key. like so:\r\n![image](https://user-images.githubusercontent.com/850871/94963214-6aad3b80-04bd-11eb-91d3-a517a3216eb0.png)\r\n\r\nTo enable code cache in NS 7 (Android and iOS)\r\nEdit your main nativescript.config.ts file, and add \r\n`\"codeCache\": \"true\"` to the `android` and/or `ios` sections.\r\n![image](https://user-images.githubusercontent.com/850871/94963636-122a6e00-04be-11eb-9db0-cef0b70ec7b4.png)\r\n\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/NathanaelA","@type":"Person","name":"NathanaelA"},"datePublished":"2020-10-02T04:30:54Z","url":"https://github.com/NativeScript/NativeScript/issues/8926"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0933652e-de75-d50b-94ab-178aac6bb9fa
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8EDE:395430:165B639:1D7E8B8:6B012EF7
html-safe-nonce83d75d790e0cbc73b66f03d1cfeb5ade51b86adbcd5a1c4c9474bba788c534bb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RURFOjM5NTQzMDoxNjVCNjM5OjFEN0U4Qjg6NkIwMTJFRjciLCJ2aXNpdG9yX2lkIjoiMzgyODIxNzYwNjcxMjY2Nzg5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3797b78a9ff0d9384c7cf6be81b4d051c6bf76192944756a1d7736af302751d2
hovercard-subject-tagissue:713337902
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/8926/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d6216814613e8f3345bb63b086d62f504edd7aecce6024896e3cb02259dfd888/NativeScript/NativeScript/issues/8926
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d6216814613e8f3345bb63b086d62f504edd7aecce6024896e3cb02259dfd888/NativeScript/NativeScript/issues/8926
og:image:altReason why we are removing... Reasons for removal: High Support cost (> 800 issues) High dev costs (breaks frequently, OS changes like Mac requires Docker, Arm64 mac... etc) Bugs with Snapshots (sn...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameNathanaelA
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/NativeScript/NativeScript/issues/8926#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F8926
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F8926
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://github.com/NativeScript/NativeScript/issues/8926
Reloadhttps://github.com/NativeScript/NativeScript/issues/8926
Reloadhttps://github.com/NativeScript/NativeScript/issues/8926
NativeScripthttps://github.com/NativeScript
NativeScripthttps://github.com/NativeScript/NativeScript
Codehttps://github.com/NativeScript/NativeScript
Issues231 (231)https://github.com/NativeScript/NativeScript/issues
Pull requests107 (107)https://github.com/NativeScript/NativeScript/pulls
Discussionshttps://github.com/NativeScript/NativeScript/discussions
Actionshttps://github.com/NativeScript/NativeScript/actions
Projectshttps://github.com/NativeScript/NativeScript/projects
Wikihttps://github.com/NativeScript/NativeScript/wiki
Security and qualityhttps://github.com/NativeScript/NativeScript/security
Insightshttps://github.com/NativeScript/NativeScript/insights
https://github.com/NativeScript/NativeScript
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/8926
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/8926
Removal of Snapshots support from NS 7.xhttps://github.com/NativeScript/NativeScript/issues/8926#top
https://github.com/NathanaelA
https://github.com/NathanaelA
NathanaelAhttps://github.com/NathanaelA
on Oct 2, 2020https://github.com/NativeScript/NativeScript/issues/8926#issue-713337902
https://user-images.githubusercontent.com/850871/94963214-6aad3b80-04bd-11eb-91d3-a517a3216eb0.png
https://user-images.githubusercontent.com/850871/94963636-122a6e00-04be-11eb-9db0-cef0b70ec7b4.png
https://github.com/NathanaelA
NathanaelAhttps://github.com/NathanaelA
on Oct 2, 2020https://github.com/NativeScript/NativeScript/issues/8926#issuecomment-702520090
https://github.com/JacobFJ
JacobFJhttps://github.com/JacobFJ
on Nov 7, 2020https://github.com/NativeScript/NativeScript/issues/8926#issuecomment-723465313
@NathanaelAhttps://github.com/NathanaelA
https://github.com/ujwal-setlur
ujwal-setlurhttps://github.com/ujwal-setlur
on Nov 23, 2020https://github.com/NativeScript/NativeScript/issues/8926#issuecomment-732409418
NathanWalkerhttps://github.com/NathanWalker
on Apr 25, 2021https://github.com/NativeScript/NativeScript/issues/8926#event-4640512410
https://github.com/fpaaske
fpaaskehttps://github.com/fpaaske
on Jan 13, 2022https://github.com/NativeScript/NativeScript/issues/8926#issuecomment-1012117148
@ujwal-setlurhttps://github.com/ujwal-setlur
ptomatohttps://github.com/ptomato
on Feb 25, 2023https://github.com/NativeScript/NativeScript/issues/8926#event-8606832898
TODO - fix: Switch off external startup data in debug modehttps://github.com/ptomato/ns-android-v8/commit/91d0206db6a661ad40f60b926c0aeac1de2f8d34
91d0206https://github.com/ptomato/ns-android-v8/commit/91d0206db6a661ad40f60b926c0aeac1de2f8d34
feat: Remove V8 heap snapshot machineryhttps://github.com/ptomato/ns-android/commit/4633bc341527cede74951b02f0e14b0cb049d778
4633bc3https://github.com/ptomato/ns-android/commit/4633bc341527cede74951b02f0e14b0cb049d778
ptomatohttps://github.com/ptomato
on Apr 19, 2023https://github.com/NativeScript/NativeScript/issues/8926#event-9049130636
feat: Remove V8 heap snapshot machineryhttps://github.com/ptomato/ns-android/commit/afa56136b4d2e82cacc3b3749c8c442cbc4a17fa
afa5613https://github.com/ptomato/ns-android/commit/afa56136b4d2e82cacc3b3749c8c442cbc4a17fa
ptomatohttps://github.com/ptomato
on May 5, 2023https://github.com/NativeScript/NativeScript/issues/8926#event-9180171136
feat: Remove V8 heap snapshot machineryhttps://github.com/ptomato/ns-android/commit/43b5a43e23ed32b10ede9a2f7c42c71423e87657
43b5a43https://github.com/ptomato/ns-android/commit/43b5a43e23ed32b10ede9a2f7c42c71423e87657
triniwizhttps://github.com/triniwiz
on May 16, 2023https://github.com/NativeScript/NativeScript/issues/8926#event-9262376140
Remove remainder of support for external startup data (#1758)https://github.com/NativeScript/android/commit/016041e74c28d4d3807df1a2ed6821301c8c0170
#1758https://github.com/NativeScript/android/pull/1758
016041ehttps://github.com/NativeScript/android/commit/016041e74c28d4d3807df1a2ed6821301c8c0170
https://github.com/NathanWalker
NathanWalkerhttps://github.com/NathanWalker
on Oct 23, 2026https://github.com/NativeScript/NativeScript/issues/8926#issuecomment-6372869660
NathanWalkerhttps://github.com/NathanWalker
completedhttps://github.com/NativeScript/NativeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 23, 2026https://github.com/NativeScript/NativeScript/issues/8926#event-34084317889
Sign up for freehttps://github.com/signup?return_to=https://github.com/NativeScript/NativeScript/issues/8926
Sign in to commenthttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/8926
NathanaelAhttps://github.com/NathanaelA
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.