Repository navigation
ADFA-7068 | Speed up Compose Preview and fix lost edits, ClassNotFoundException and comment parsing - #161
Open
Daniel-ADFA wants to merge 2 commits into
Open
ADFA-7068 | Speed up Compose Preview and fix lost edits, ClassNotFoundException and comment parsing#161Daniel-ADFA wants to merge 2 commits into
Daniel-ADFA wants to merge 2 commits into
Conversation
…dException and comment parsing Keep one compiler daemon for the plugin instead of one per preview screen, and warm it when a Compose file is shown. Call D8 through the API that exists so dexing stays in the daemon. Clear the class output folder before each compile. Save the open file before opening the preview (adds filesystem.write). Dex the project's compiled classes in the plugin and key the preview cache on them, because Quick Build rewrites the build's dex output without them. Show why a build was refused, point at an unbuilt project on unresolved references, and ignore comments when looking for @Preview.
hal-eisen-adfa
left a comment
Contributor
There was a problem hiding this comment.
Review comments from reading the code. None has been reproduced on a device yet.
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.
ADFA-7068
Jetpack Compose Preview plugin:
D8Command.parse(String[], Origin). The old reflective call named a method that does not exist, so dexing always fell back to a second JVM.filesystem.writepermission.ClassNotFoundExceptionat render.@Preview.Pixel 9 Pro, median tap to preview loaded after an edit: 6.1 s to 0.6 s (14 lines), 11.4 s to 1.9 s (98 lines), 18.5 s to 4.5 s (1,214 lines).
Limits: the daemon stops after 5 idle minutes, so the next preview is cold again.
@Previewinside a string literal is still matched. The plugin has no unit tests; the parser change was checked with a script outside the repo.