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

Chokes on large files #13

Closed
shirotech opened this issue May 20, 2020 · 8 comments
Closed

Chokes on large files #13

shirotech opened this issue May 20, 2020 · 8 comments

Comments

@shirotech
Copy link
Contributor

It seems files larger than 66K will give this kind of error:

[!] (plugin svelte) RangeError: Maximum call stack size exceeded
src/pages/modules/core/changelog.md
RangeError: Maximum call stack size exceeded
    at /Volumes/Projects/Projects/docs/node_modules/svelte/node_modules/code-red/dist/code-red.mjs:581:10
    at /Volumes/Projects/Projects/docs/node_modules/svelte/node_modules/code-red/dist/code-red.mjs:226:10
    at handle (/Volumes/Projects/Projects/docs/node_modules/svelte/node_modules/code-red/dist/code-red.mjs:70:17)
    at /Volumes/Projects/Projects/docs/node_modules/svelte/node_modules/code-red/dist/code-red.mjs:248:18
    at Array.map (<anonymous>)
    at handle_body (/Volumes/Projects/Projects/docs/node_modules/svelte/node_modules/code-red/dist/code-red.mjs:247:21)
    at Program (/Volumes/Projects/Projects/docs/node_modules/svelte/node_modules/code-red/dist/code-red.mjs:318:10)
    at handle (/Volumes/Projects/Projects/docs/node_modules/svelte/node_modules/code-red/dist/code-red.mjs:70:17)
    at print (/Volumes/Projects/Projects/docs/node_modules/svelte/node_modules/code-red/dist/code-red.mjs:1413:17)
    at Component.generate (/Volumes/Projects/Projects/docs/node_modules/svelte/src/compiler/compile/Component.ts:316:9)
@AlexxNB
Copy link
Owner

AlexxNB commented May 20, 2020

Looks like it is code-red issue. 66K per md file, you mean?

@shirotech
Copy link
Contributor Author

Yeah that is right, this if for an .md file. I'm not sure what is using code-red as I can't find it in the lock file.

@AlexxNB
Copy link
Owner

AlexxNB commented May 20, 2020

Svelte-compiler - see the last line

@AlexxNB
Copy link
Owner

AlexxNB commented May 20, 2020

I'm not sure is there any limit of the html elements per svelte components. I think, better way to split file and import those parts into it

@shirotech
Copy link
Contributor Author

Cool was just doing some testing, not really needed. I can link the file for external for now. Having said that large files are having problems loading on the UI side as well as loading everything in memory and then routing it.

@AlexxNB
Copy link
Owner

AlexxNB commented May 20, 2020

I think the problem is not filesize itself but number of html-elements after markdown code processing. Could you share this file, I'll do some tests.

@shirotech
Copy link
Contributor Author

shirotech commented May 20, 2020

@AlexxNB Unfortunately it is a changelog for a framework within our org so I won't be able to share it. But the React one is quite large as well and have the same issue https://raw.githubusercontent.com/facebook/react/master/CHANGELOG.md

@shirotech
Copy link
Contributor Author

shirotech commented May 20, 2020

Looks like they are already on to it, more info can be found from this issue sveltejs/svelte#4694

@AlexxNB AlexxNB closed this as completed May 21, 2020
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