Remove remainder of support for external startup data #1758
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As per NativeScript/NativeScript#8926, external startup data is no longer supported. We can gain a small amount of size savings by building V8 with support for external startup data switched off.
Without the machinery to load an external snapshot from a file, nothing is using MemoryMappedFile any longer, so we can remove it. File::Exists has one remaining usage, but that usage is redundant, so we can remove it as well.
As you can see in this PR, the V8 libraries get slightly larger (30–40 kb depending on architecture) because they now include the snapshot internally. But the total size of an APK shrinks, because we don't need to link the external startup data into the runtime. I tested with a hello world app, and got -564 kb for debug, -23 kb for release.
We also don't need to separately commit
snapshot_blob.h
to this repo anymore, which makes the process for modifying V8 slightly easier.The V8 artifacts added in this PR were built from my fork of v8-buildscripts, with commits from NativeScript/v8-buildscripts#2 ported to all the Android branches. Unfortunately I had to delete and recreate my fork in order to open the PR (I guess because I forked it when the repo was private?) so the jobs that created those artifacts are gone. In order to establish provenance for the artifacts, what I'd recommend is to review and merge NativeScript/v8-buildscripts#2 first and port it to the other Android branches, then we can rebuild all 4 of them and I'll update this PR with the resulting artifacts from those jobs.Related Pull Requests
Does your pull request have unit tests?
No tests; all functionality should be unchanged, except that the
heapSnapshotScript
andsnapshot.blob
config options should now be ignored completely.