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

Add test and improve performance #4

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

tinchoz49
Copy link
Collaborator

The recently support for chrome 81 decrease the performance since we have to get on every read/write an updated entry.file: #3

This PR improve that:

  • The write process only use the size prop of the file, something that we can get updated on every write request and just use that information instead of getting a new entry file.

  • The read process is different, it needs the updated file, so every time that we write into the file we marked to update. With this approach only when the file was really updated it would try to get a new entry file.

current version

10000 tiny writes: 10936.55419921875ms
10000 tiny reads: 10997.553955078125ms
512mb write: 19099.5107421875ms
512mb read: 18458.8701171875ms

PR version

10000 tiny writes: 5605.403076171875ms
10000 tiny reads: 6444.77099609375ms
512mb write: 13663.65771484375ms
512mb read: 6499.1806640625ms

@tinchoz49 tinchoz49 requested a review from mafintosh April 30, 2020 14:58
@tinchoz49 tinchoz49 marked this pull request as draft April 30, 2020 18:18
package.json Outdated
"standard": "^11.0.1"
"budo": "^11.6.3",
"puppeteer": "^3.0.2",
"random-access-test": "github:random-access-storage/random-access-test",
Copy link
Contributor

Choose a reason for hiding this comment

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

i didn't realise we had this! should we publish that to npm?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I noticed the same. We should, I think is really helpful to test these modules.

Copy link
Contributor

Choose a reason for hiding this comment

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

published

@tinchoz49 tinchoz49 self-assigned this May 26, 2020
@arj03
Copy link

arj03 commented Jun 26, 2020

These changes looks great @tinchoz49. Anything I can do to move this forward?

@tinchoz49
Copy link
Collaborator Author

tinchoz49 commented Jun 26, 2020

Hey @arj03 thanks :).

We are testing this PR in our application and trying to get stability. It seems working but we are having a race condition issue and we need to check if it belongs to this PR or not. After that I will put into review next week.

@arj03
Copy link

arj03 commented Jul 1, 2020

Been testing this, not sure about the speed diff, but at least I didn't get any errors from manual testing with this new code.

@tinchoz49 tinchoz49 force-pushed the tinchoz49/improve-performance branch from 0bd3705 to 816729f Compare July 2, 2020 18:37
@tinchoz49 tinchoz49 force-pushed the tinchoz49/improve-performance branch from 816729f to 7c73c6f Compare July 2, 2020 20:44
@arj03
Copy link

arj03 commented Jul 10, 2020

On further testing I'm getting a few of these: Could not satisfy length

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.

3 participants