Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡️ lazily load serialized portfolio #108

Merged
merged 1 commit into from
Mar 31, 2024

Conversation

mingi3314
Copy link
Owner

@mingi3314 mingi3314 commented Mar 31, 2024

TL;DR

This PR improves the performance of portfolio value calculation.

What changed?

The PR changes how the portfolio value is calculated and fetched. Previously, the serialized portfolio was fetched on every call, which would cause unnecessary API calls and slow down the application. With this PR, the serialized portfolio is only fetched when needed, and then stored in an instance variable for later use.

How to test?

  1. Track the time taken to fetch portfolio value before and after this change.

  2. Check for any inconsistencies in the fetched data

Why make this change?

This change reduces the number of API calls and improve the performance of the application.


Copy link
Owner Author

mingi3314 commented Mar 31, 2024

Copy link
Owner Author

mingi3314 commented Mar 31, 2024

Merge activity

  • Mar 31, 9:17 AM EDT: @mingi3314 started a stack merge that includes this pull request via Graphite.
  • Mar 31, 9:19 AM EDT: Graphite rebased this pull request as part of a merge.
  • Mar 31, 9:20 AM EDT: @mingi3314 merged this pull request with Graphite.

Base automatically changed from 03-31-_add_profit_field_to_position_model_and_portfolio_class to main March 31, 2024 13:18
@mingi3314 mingi3314 force-pushed the 03-31-_lazily_load_serialized_portfolio branch from 4d96e46 to 625239b Compare March 31, 2024 13:18
@mingi3314 mingi3314 merged commit 0bd42ac into main Mar 31, 2024
2 checks passed
@mingi3314 mingi3314 deleted the 03-31-_lazily_load_serialized_portfolio branch March 31, 2024 13:20
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.

1 participant