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

3739 performance improvement #3739

Merged
merged 6 commits into from
Jul 14, 2023

Conversation

jadekstewart3
Copy link
Contributor

Checklist:

[x] I have performed a self-review of my own code,
[x] I have commented my code, particularly in hard-to-understand areas,
[x] I have made corresponding changes to the documentation,
[requires production test] I have added tests that prove my fix is effective or that my feature works,

  • New and existing unit tests pass locally with my changes ("bundle exec rake"),
    [x] Title include "WIP" if work is in progress.

-->

Resolves #3727

Description

I have applied the performance enhancement change to other exports that require this change. I also noticed that the uniq method was being called in most of the item_headers methods, I have implemented the use of a Set data structure to eliminate the need for calling uniq, and hopefully improve the over all performance of the exports a bit more.

List any dependencies that are required for this change. (gems, js libraries, etc.)

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

This will require a test on the production copy before merging.

@dorner
Copy link
Collaborator

dorner commented Jul 14, 2023

Old:

Donations 127.800472   1.720314 129.520786 (131.679328)
Product Drives 6.785411   0.556920   7.342331 ( 12.114067)
Purchases 0.619706   0.006018   0.625724 (  0.649099)
Requests 0.903873   0.022209   0.926082 (  1.247323)

New:

Donations 1.646709   0.153574   1.800283 (  2.193139)
Product Drives 5.801143   0.713599   6.514742 ( 11.510426)
Purchases 0.152862   0.001546   0.154408 (  0.189587)
Requests 0.760072   0.019760   0.779832 (  0.954667)

Looks like donations was the only one that had a significant performance issue, but this definitely fixes it! Thanks!

Copy link
Collaborator

@dorner dorner left a comment

Choose a reason for hiding this comment

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

Looks good!

@dorner dorner merged commit a6bf1cf into rubyforgood:main Jul 14, 2023
@jadekstewart3 jadekstewart3 changed the title 3727 performance improvement 3739 performance improvement Nov 16, 2023
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.

Performance improvement on (nearly) all exports
2 participants