Closed RisingOrange closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 87.41%. Comparing base (
6da6afc
) to head (c93c4b0
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This pull request was deployed and Sentry observed the following issues:
1322529746.gui.operations.deck_installation in ...
View Issue1322529746.gui.operations.deck_installation in ...
View IssueDid you find this useful? React with a 👍 or 👎
This PR improves the performance of the
AnkiHubImporter
by removing log statements fromAnkiHubImporter._prepare_note
. These log statements were taking the majority of the time of the import.Related issues
https://ankihub.atlassian.net/jira/software/c/projects/BUILD/boards/1?selectedIssue=BUILD-421
Proposed changes
AnkiHubImporter._prepare_note
. This improves performance a lot.These performance measurements were taken by running
test_anking_deck_first_time_import
with 10_000 notes instead of 100 notes. This can be adjusted here: https://github.com/ankipalace/ankihub_addon/blob/8e56c11d9237d61e699eabc5c8684f695f0eaeea/tests/addon/performance/test_ankihub_importer.py#L71Before
You can see that ~8 seconds of the total ~14 seconds are spent in
_proxy_to_logger
(which is part ofstructlog
).After
After the log statements in
AnkiHubImporter._prepare_note
were removed, the import takes ~9 seconds less.