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

Docusaurus - OOM at scale & Perf vs Prism.js discussion #117

Open
orta opened this issue Oct 2, 2021 · 3 comments
Open

Docusaurus - OOM at scale & Perf vs Prism.js discussion #117

orta opened this issue Oct 2, 2021 · 3 comments

Comments

@orta
Copy link
Contributor

orta commented Oct 2, 2021

Comparing prism.js in johnnyreilly/blog.johnnyreilly.com#95

@orta
Copy link
Contributor Author

orta commented Oct 2, 2021

Maybe related: jestjs/jest#11657

Bails with 10:04:16 AM: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Array but then OOMS

@orta orta changed the title Perf vs Prism.js Docusaurus - OOM at scale & Perf vs Prism.js discussion Oct 2, 2021
@johnnyreilly
Copy link
Contributor

johnnyreilly commented Oct 2, 2021

Thanks for writing this up @orta! Happy to be a test case!

Worth mentioning that I have 200+ blog posts and so we're working Docusaurus and Twoslash quite hard

@johnnyreilly
Copy link
Contributor

I've converted all my JS / TS samples over to use twoslash with a little regex magic. In doing so the twoslash is now out of memory-ing even harder than before:

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0xafd010 node::Abort() [node]
 2: 0xa141fb node::FatalError(char const*, char const*) [node]
 3: 0xce746e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xce77e7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xeb5c85  [node]
 6: 0xec5401 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 7: 0xec7fae v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 8: 0xe899da v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
 9: 0x11fea76 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
10: 0x15e7fb9  [node]
Aborted (core dumped)
Error: Process completed with exit code 134.

https://github.com/johnnyreilly/blog.johnnyreilly.com/runs/3787296743?check_suite_focus=true

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