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

Stress test #13

Open
xUser5000 opened this issue Jul 3, 2021 · 2 comments
Open

Stress test #13

xUser5000 opened this issue Jul 3, 2021 · 2 comments

Comments

@xUser5000
Copy link
Contributor

I stress tested the code with large .bib files. I already did that before with a ~300KB file, but this time I tried much larger files.

Method

I couldn't find a BibTeX file with 1GB of data so I downloaded this file. After that, I wrote a script that makes another copy of the file and then starts duplicating its contents over and over again until it reaches a certain size that I specify.

Machine specs

  • Processor: Intel Core i5-10210U (1.60GHz × 8)
  • RAM: 16GB
  • Disk: 240GB SSD
  • OS: Ubuntu 20.04 64-bit

Results

After adjusting the size parameter and observing what happens to the plugin when I execute the main command, I came up with the following conclusions:

  • If the size is above 512MB (about equivalent to 536870912 Bytes, which is about equivalent to 0x1FFFFFE8 Bytes in Hexadecimal), nothing happens for one or two seconds then the below alert appears:
    Cannot create a string longer than 0x1FFFFFE8 characters
  • If the size is below 512MB, nothing happens for about 20 seconds or so, then the call stack will not afford that much data and will throw an error like this:
    Maximum call stack size exceeded
  • If the size <= 12MB (which accounts for about 40,000 references), the plugin works fine and there are no issues at all.
@laurent22
Copy link
Member

Do you know at what point the "Maximum call stack" error happens? Is that somewhere in your code, or in the library?

Also could you find out what's the actual max file size currently? Is that 12MB or can it be larger?

@xUser5000
Copy link
Contributor Author

xUser5000 commented Jul 3, 2021

Do you know at what point the "Maximum call stack" error happens? Is that somewhere in your code, or in the library?

It loads the raw contents of the file into memory but then fails when calling citation.js method inside the parsing function.

Also could you find out what's the actual max file size currently? Is that 12MB or can it be larger?

I was not able to exactly determine the max file size, but I'm sure it is between 32MB and 48MB.

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

No branches or pull requests

2 participants