How much javascript can a PDF document handle ?
This may be a ¨how long is a piece of string question¨, but I am hoping someone out there has experienced the following issue so I can

determine the limits of what Acrobat DC can do for my project.
I am creating Primary Maths Resources so that teachers have more material to work with in the class.
This may be a ¨how long is a piece of string question¨, but I am hoping someone out there has experienced the following issue so I can determine the limits of what Acrobat DC can do for my project.
I am creating Primary Maths Resources so that teachers have more material to work with in the class beyond the textbook without having to search the Internet.
Why Adobe Acrobat ?
I want to use the same graphics as the textbooks (which are already available in pdf format).
I want the resources to be available off-line for when the internet fails (it happens !!).
Why the need for javascript ?

With javascript I can create pages of exercise that can be randomized at the touch of a button.
I can take one page from the textbook and create 5 more that will have questions at different levels (differentiation) for slow to fast learners - all on the same pdf document if needed.
As a result a Maths textbooks of 100 pages becomes, via acrobat dc, a resource of 500 or more additional pages.
Note: I am not a programmer but have manage to find on the internet javascript routines which I have been able to adapt.
So what is the problem ?
As I gather the pages I have created together into one document I start to see a significant slowdown on some of the pages when loading up.
It may be that I am not using the most efficient coding or I am using acrobat dc beyond what it was intended for.

I am interested in the experience of anyone else who has taken Acrobat DC into other areas than just creating forms and has come across this problem.
Also anyone who has tried using Acrobat for creating resources for Mathematics.
