Repository navigation
perf(launch): compile string tables as UTF-8 and keep hidden menu work off the first frame - #4430
Merged
Merged
Conversation
…tnotes and the registry cache off the first frame
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
STRINGS_FILE_OUTPUT_ENCODING[sdk=macosx*] = UTF-8). Linked against the macOS 27.0 SDK that CI builds with, CFBundle parses a binary table again, filtered to one key, for every key it has not seen yet. An XML table is parsed once and kept. iOS keeps binary. This reverses the format choice of Cut 5 MB from the bundle, and the layering that made it hard to find #2701: UTF-8 is 0.26 MB bigger on disk than binary over the 7 shipped languages (3.68 vs 3.42 MB), 46 KB smaller compressed with xz, against 1.9 MB for the UTF-16 default.runRegistryUpdatePasstakes itsRegistryClientas an autoclosure and resolves it only after the empty-targets guard. A launch with no outdated plugin no longer opens the registry URL cache before the first window;PostLaunchWorkbuilds the client after the frame, as before.Measured (Time Profiler launches to the Welcome window, main-thread ms, median, interleaved, 6 bench connections, MacBook Pro M4):
willFinishLaunchingtomenuInstalled(same pair)phys_footprint5 s after launch, MB (n=2)Localizable.stringswere converted to UTF-8 XML, so they differ only in the table format. Load was 13 to 31 during that pair; the ratios held in every interleaved round.footnoteWrapsWhenShownpins that no footnote is laid out at build.Tests changed on purpose:
CompiledStringsFormatTests.everyLanguageIsBinarybecomeseveryLanguageIsUTF8XML: every compiledLocalizable.stringsis a UTF-8 XML property list.ManualCommitMenuTests.itemsFollowSafeModeLevelreads the footnote's plain title at build; newfootnoteWrapsWhenShownchecks the shown row is wrapped and the other is not.PluginRegistryUpdatePassTests.noTargetsNoFetchalso counts that the client is never resolved.Deliberately not fixed here:
restoreNprofile the harness does not have yet, and it has to land after the close-path and session-save changes in other lanes.NSApplication.sharedcost under the probe'sposix_spawn(13e): cause not found, no code change.Test plan
verify.sh teston CompiledStringsFormatTests, ManualCommitMenuTests, PluginRegistryUpdatePassTests, SafeModeMenuDelegateTests, FrenchCountedStringsTests, MainMenuBuildPurityTests, MainMenuBuilderTests: 75 passed.verify.sh linton every changed Swift file: 0 violations.Localizable.stringsstarts with<?xml version="1.0" encoding="UTF-8"?>; all 16 bundled plugins load.