Open dorlanpabon opened 5 months ago
Can you run bun upgrade
and try again?
Thank you for your response.
I have also tried running bun upgrade and tested it with version 1.1.10, and the performance issue persists. The document generation time is still significantly higher compared to version 1.1.8.
Here are the details:
Version 1.1.8: Approximately 2 seconds to generate the Excel document. Version 1.1.10: Approximately 50 seconds to generate the same document.
I noticed that this performance degradation started with version 1.1.9. Could it be related to this pull request or this pull request which was merged around the same time (5 days before the release of 1.1.9)?
If there's anything else you'd like me to try or additional information you need, please let me know. Thank you for your assistance.
This is an event loop regression. Something is not being ref'd that was previously ref'd. It works after a minute because that's when the event loop woke up next time.
As a very temporary workaround, you can try sticking a setInterval(() => {}, 16)
somewhere to force the application to wake up every 16 milliseconds
+1 on Windows + Bun@1.1.17
I also came across the fact that Excel JS on Bun generates a document for about 14 seconds when on Node it is less than 71ms
Node.js@20
PerformanceMeasure {
name: 'some',
entryType: 'measure',
startTime: 10377.2243,
duration: 71.45349999999962
}
vs
Bun@1.1.17
PerformanceMeasure {
detail: null,
name: "some",
entryType: "measure",
startTime: 7292.4023,
duration: 14305.9681,
toJSON: [Function: toJSON],
}
What version of Bun is running?
1.1.9+bb13798d9
What platform is your computer?
Microsoft Windows NT 10.0.19044.0 x64
What steps can reproduce the bug?
Use Bun.js version 1.1.8 with Hono to generate an Excel document. Measure the time taken for the document to be generated (approximately 2 seconds). Upgrade to Bun.js version 1.1.9 or higher. Generate the same Excel document and measure the time taken (approximately 50 seconds). Code Snippet:
What is the expected behavior?
The document generation time should be consistent or improved in newer versions.
What do you see instead?
The document generation time has increased significantly from version 1.1.9 onwards, taking approximately 50 seconds compared to 2 seconds in version 1.1.8.
Additional information
Operating System: Windows Library: "exceljs": "^4.4.0", "hono": "^4.3.11" The process involves populating data and adding styles to columns A to HB and 51 rows. Using Hono with Bun.js. If there are any specific changes or updates in version 1.1.9 or higher that might have caused this, please let me know. I would appreciate any guidance or fixes for this issue.