Skip to content

Conversation

@vLuckyyy
Copy link
Member

No description provided.

@vLuckyyy vLuckyyy requested a review from a team as a code owner January 18, 2026 22:59
# Conflicts:
#	eternaleconomy-core/build.gradle.kts
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the leaderboard data flow by extracting the logic from AccountManager into a new LeaderboardServiceImpl. This is a good structural improvement that separates concerns. The new service introduces caching for the top players, which is a great step towards better performance.

However, I've identified several critical performance issues in the new implementation, primarily related to database interactions. The code currently loads large amounts of data (sometimes all accounts) into memory for sorting and filtering, which should be handled by the database using appropriate SQL queries. I've also noted a performance regression in the account prefix search functionality.

My review includes detailed suggestions on how to resolve these performance bottlenecks by leveraging database capabilities more effectively. Additionally, I've pointed out a minor dependency version inconsistency in the build configuration and a suggestion to use proper logging.

@vLuckyyy
Copy link
Member Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the leaderboard system to improve performance and scalability. The key changes include extracting leaderboard logic from AccountManager into a new LeaderboardServiceImpl, implementing a caching layer with Caffeine, offloading leaderboard queries to the database, and making data retrieval asynchronous. The refactoring is well-executed. However, I've identified a critical regression in the account creation logic and a bug in the new leaderboard implementation. My review includes suggestions to address these points.

…rdServiceImpl` to use accurate total entry calculations.
@vLuckyyy vLuckyyy changed the title Refactor data flow in leadeboards GH-104 Refactor baltop using database indexes. Jan 19, 2026
@vLuckyyy vLuckyyy merged commit 5a5ef08 into master Jan 19, 2026
1 check passed
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