gabriel-dehan / dyson-sphere-blueprints

A community website to share dyson sphere program blueprints
47 stars 11 forks source link

When trying to open large blueprints I get this error. #32

Closed Inspiredememy closed 3 years ago

Inspiredememy commented 3 years ago

When trying to open large blueprints I get this error. image

gabriel-dehan commented 3 years ago

Hey man, could you link me the blueprint in question? Thanks

Inspiredememy commented 3 years ago

This is the one I was trying. https://www.dysonsphereblueprints.com/blueprints/science-planet-2500-min-from-raw

Seems to happen when its loading the text for the blueprint field.

gabriel-dehan commented 3 years ago

@Inspiredememy yeah that's just a way too big blueprint (100k structures) and loading simply takes too long. You can choose to wait and eventually it will load though, just tried it. It took a good few minutes. I am not sure yet what's the best way of going about those very big blueprint that take forever to load, I am considering a few options atm :)

sho918 commented 3 years ago

@gabriel-dehan How about not including blueprint string in blueprints#show.html and render blueprints in blueprints#show.text? If blueprint is large, show a link to the blueprint instead of a copy button.

スクリーンショット 2021-10-07 23 34 51

https://github.com/sho918/dyson-sphere-blueprints/commit/063a204b77befc1ebeeb4a1fce7d197cee8dc637

gabriel-dehan commented 3 years ago

Hey @sho918, I was thinking of something like that (blueprint code not in the page), your solution seems quite elegant and should work well, I am all for it 👍

sho918 commented 3 years ago

Thanks, I created the PR.

gabriel-dehan commented 3 years ago

@Inspiredememy the fix (by sho) is live and working very well, you should be able to access large blueprints now