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

slow to load (6-10 seconds in zebra_form.js ) #23

Open
JeffBuckles opened this issue Feb 10, 2016 · 7 comments
Open

slow to load (6-10 seconds in zebra_form.js ) #23

JeffBuckles opened this issue Feb 10, 2016 · 7 comments

Comments

@JeffBuckles
Copy link

I have a page with almost 800 controls -- it's a list editor as shown in the attachment (I sent an image of the page by separate email.)
About half of the controls are "dummy", disabled select controls used to emulate "readonly" functionality for the "real" select controls. After the page loads it takes from 6 to 10 seconds before the page is responsive. I determined that almost all of this time is spent somewhere in zebra_form.js (the page load speeds up by that much when I do not load that one javascript file).

Do you have any suggestions for how I might speed up the page load? For example, whatever initialization it is doing on the controls in the ".each" loop, is there a property I can put on the "dummy" controls so it will skip them? Or any other suggestions?

Thanks and Best Regards,

@stefangabos
Copy link
Owner

Can you please email me the code for generating that monstrosity of a form? :) I'll definitely have a look once I can reproduce the issue. It’s most likely something that’s altering the DOM – usually that is something that takes up a lot of time (although, I don’t see that you have that so, I assume it’s an issue with my code somewhere)

@JeffBuckles
Copy link
Author

Here's a test case.

Rather than including the monstrosity that is the code generating
the form :) (I'm really a hardware guy, not a software professional),
I built a test case using the rendered html.
The main page is "SetupClassSessions.php".

This is not high priority; don't spend a lot of time on it unless
it's interesting to you!

Thanks and Best Regards,
-- Jeff Buckles
-- Aloha, OR, USA
-- [email protected]

On 2/10/2016 1:00 AM, Stefan Gabos wrote:

Can you please email me the code for generating that monstrosity of a
form? :) I'll definitely have a look once I can reproduce the issue.
It’s most likely something that’s altering the DOM – usually that is
something that takes up a lot of time (although, I don’t see that you
have that so, I assume it’s an issue with my code somewhere)


Reply to this email directly or view it on GitHub
#23 (comment).

@stefangabos
Copy link
Owner

You forgot to attach the file. I am very interested in making the library better!:)

@JeffBuckles
Copy link
Author

Commenting with regard to our email exchange in case anyone else comes looking about this issue.
I had too many dependencies in the form. However, I wonder if there is any opportunity to optimize this on page load when the first dependency is a "submit" button. Do these need to be validated on page load, or only when the form is submitted?
Thanks!

@JeffBuckles
Copy link
Author

Workaround was to disable clientside validation. This can be closed.
Thanks,

@stefangabos
Copy link
Owner

This is not really a solution...I'm going to look more into this, just to make sure that there are no faults in the code

@JeffBuckles
Copy link
Author

I think also I'm abusing the concept of "HTML form" with this page design... :)
A better solution has been found! Thanks for checking into it.

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