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

Performance improvement 904 #907

Merged
merged 4 commits into from
Dec 6, 2022

Conversation

J007X
Copy link
Collaborator

@J007X J007X commented Nov 29, 2022

This PR fixes #904.

Description of changes

Profiling test find bottleneck in the "get"method of Entry in data_pack.py where using len() causing
slowdown so after discussion this is now fixed using underlying number count.

Possible influences of this PR.

This change can significantly improve the performance and the impact is minimal .

Test Conducted

This should pass all existing unit test code and have good performance on the profiling test.

@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Merging #907 (8e15838) into master (19b9c79) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #907   +/-   ##
=======================================
  Coverage   81.00%   81.01%           
=======================================
  Files         254      254           
  Lines       19583    19583           
=======================================
+ Hits        15864    15865    +1     
+ Misses       3719     3718    -1     
Impacted Files Coverage Δ
forte/data/data_pack.py 85.24% <ø> (+0.16%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@hunterhector hunterhector left a comment

Choose a reason for hiding this comment

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

The PR is simple and I think it is fine.

Just fix the first line of the PR message, use the issue url.

@J007X
Copy link
Collaborator Author

J007X commented Nov 30, 2022

The PR is simple and I think it is fine.

Just fix the first line of the PR message, use the issue url.

Sorry the issue link previously was using a wrong URL of my branch. Just changed to the public issue URL of 904.

@hunterhector
Copy link
Member

The PR is simple and I think it is fine.
Just fix the first line of the PR message, use the issue url.

Sorry the issue link previously was using a wrong URL of my branch. Just changed to the public issue URL of 904.

I just updated the regular way.

@hunterhector hunterhector merged commit 10b1632 into asyml:master Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants