Is there a way of splitting hype_generated_script.js file?


(Lukas) #1

Hello,
My project become bigger than originally planned and _hype_generated_script.js file grew from 21 MB to almost 50MB. This is becoming an issue when I use cordova to build an app and try to run it on devices with less than 2GB of ram (ONLY 6s and up, iPad Air 2+ have 2GB or more). Is there a way of optimizing hype app/optimising cordova/using js file to make it use less memory?


(Hans-Gerd Claßen) #2

how did you get there? any pasted svg-code?


(Jonathan Deutsch) #3

There’s no silver bullet to reducing the size. The most common cause of bloat is a large number of symbols, scenes, or inner HTML, but I’d need to see a zip of your .hype document to offer better advice.


(Lukas) #4

Project has 650 scenes… fade in animations, 1 html symbol on all scenes…

I’ve tried to remove fade in effect on 10 slides but that did nothing to the javascript file size, i’ve turned off “preload” for all assets… There isn’t much else to it, 350 asset files - most of them less than 50kb, 4 webfonts, jQuery and few other libs, 20 pdfs…


(Lukas) #5

Sorry I can’t distribute code for this particular client…


(Hans-Gerd Claßen) #6

650 scenes in one document¿! i’ll guess best way is to split the document …


(Rick) #7

Jaah… that’s (no disrespect intended) crazy. Even with Flash in the past, at some point you had to break your project up in more manageable chunks.


Daniel suggests there a max of 50 scenes, depending on what you do with them. the poster below him describes how he ‘fixed’ it for him.

(holy moly 650 scenes… you must have a new record here) :scream:


(Lukas) #8

Well I can assure you 400 scenes is completely fine, 650 is a bit too much. Ok I’ll deal with it one way or another…


(Jonathan Deutsch) #9

I think 650 does take the record! As scene data contains all other data (timelines, elements, etc.) this will definitely result in the file growing significantly. There’s no real tips to reduce this beyond limiting the number of scenes. (You could theoretically do an advanced export that does per-scene exports, but you’d lose all linkage between scenes).