Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

Improved the performance of the recursive culling process in vm/ByteCodeTranslator by implementing a method usage index.
Instead of iterating over all methods to check for usages, we now build a lookup map (methodName + signature) -> List<CallerMethod>.
This significantly reduces the time complexity of the culling phase.

Added StressTest to vm/tests which generates 50 classes with 50 methods each in a call chain and measures the optimization time.
Verified that the stress test passes and the optimization runs.


PR created automatically by Jules for task 13668188001983558242 started by @shai-almog

@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • Tests: 103 total, 0 failed, 0 skipped
  • ⚠️ Coverage report not generated.

Static Analysis

  • ✅ SpotBugs: no findings (report was not generated by the build).
  • ⚠️ PMD report not generated.
  • ⚠️ Checkstyle report not generated.

Generated automatically by the PR CI workflow.

@github-actions
Copy link

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Collaborator

shai-almog commented Dec 17, 2025

iOS screenshot updates

Compared 4 screenshots: 0 matched, 4 updated.

  • graphics-draw-line — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-line
    Preview info: JPEG preview quality 70; JPEG preview quality 70; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-line.png in workflow artifacts.

  • graphics-draw-rect — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-rect
    Preview info: JPEG preview quality 70; JPEG preview quality 70; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-rect.png in workflow artifacts.

  • graphics-fill-round-rect — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-fill-round-rect
    Preview info: JPEG preview quality 70; JPEG preview quality 70; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-fill-round-rect.png in workflow artifacts.

  • kotlin — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    kotlin
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as kotlin.png in workflow artifacts.

Benchmark Results

  • VM Translation Time: 324 seconds
  • Compilation Time: 69 seconds

Created a method usage index before starting the culling process in `Parser.java`.
This avoids the O(N^2) complexity of `isMethodUsed` which previously scanned all methods to find usages.
The index maps method signatures (name + descriptor) to a list of callers.
`BytecodeMethod.java` was updated to include logic for populating this index.
Added a stress test `StressTest.java` to verify performance and correctness on a generated codebase.
@shai-almog shai-almog force-pushed the vm-translator-culling-optimization-13668188001983558242 branch from e46fb40 to 5abc6b5 Compare December 17, 2025 13:45
@shai-almog shai-almog closed this Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants