Skip to content

Conversation

@tobi
Copy link
Member

@tobi tobi commented Jul 29, 2025

Yea so those were totally broken. That makes it hard to actually work on the performance.

SCR-20250729-pxib

@tobi tobi requested review from Copilot and ianks July 29, 2025 22:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the broken rake benchmarks:run task by refactoring the ThemeRunner class to properly handle theme loading, template compilation, and rendering. The changes address issues with file path resolution, method naming, and data structure initialization that were preventing the benchmark suite from running.

  • Refactored ThemeRunner to use hash-based test storage instead of positional parameters
  • Added support for strictness parameters and improved file system handling
  • Fixed YAML formatting issues in test data and updated benchmark/profile scripts

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
performance/theme_runner.rb Major refactor of test loading, compilation, and rendering logic with improved error handling
performance/shopify/vision.database.yml Fixed YAML formatting by converting multi-line strings to single-line format
performance/shopify/database.rb Added missing database fields and reorganized initialization order
performance/profile.rb Enhanced profiling output with better file organization and reporting
performance/benchmark.rb Updated method calls to match refactored ThemeRunner API

Comment on lines +91 to 92
@compiled_tests ||= compile_all_tests
@compiled_tests.each do |test|
Copy link

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The memoization of @compiled_tests will cause issues if render_all is called multiple times, because the previous bug on line 108 modifies the layout objects in place. The compiled tests should be recompiled or the layout modification should be avoided.

Suggested change
@compiled_tests ||= compile_all_tests
@compiled_tests.each do |test|
compiled_tests = compile_all_tests
compiled_tests.each do |test|

Copilot uses AI. Check for mistakes.
tobi and others added 3 commits July 29, 2025 18:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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