Skip to content

Conversation

@danlamanna
Copy link
Member

No description provided.

@danlamanna danlamanna requested a review from Copilot October 29, 2025 19:52
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 optimizes the leaderboard query performance by replacing ORM object fetching with dictionary-based queries using .values() and switching from the standard library json module to the faster orjson library.

  • Replaces ORM model queries with .values() to return dictionaries instead of model instances
  • Adds orjson dependency for faster JSON serialization
  • Updates templates and tests to access dictionary keys instead of object attributes

Reviewed Changes

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

Show a summary per file
File Description
stade/core/views.py Optimizes leaderboard query to use .values() for dictionary output; implements manuscript URL generation using S3FileField; switches to orjson for JSON serialization
stade/core/tests/test_leaderboard.py Updates test assertions to access dictionary keys instead of object attributes
stade/core/templates/leaderboards.html Updates template to use dictionary key syntax for submission data
setup.py Adds orjson dependency
requirements.txt Pins orjson version to 3.11.4

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@danlamanna danlamanna force-pushed the improve-leaderboard-performance branch from e805ae9 to ff32788 Compare October 29, 2025 19:56
@danlamanna danlamanna force-pushed the improve-leaderboard-performance branch from ff32788 to 1ccd99f Compare October 29, 2025 20:01
@danlamanna danlamanna merged commit 1eecfb7 into master Oct 29, 2025
1 check passed
@danlamanna danlamanna deleted the improve-leaderboard-performance branch October 29, 2025 20:05
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