-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Move scripts from <head> to the end of <body> #24
Comments
I had a javascript issue - I don't remember what it was - and moving the scripts away from body to head helped solve the problem, maybe. I don't remember well. Maybe it was just something I tried that didn't actually help. And it wasn't so much maybe where they were but that the the layout renders the scripts async, so maybe there was a race condition. So, this optimization might be nice, but I doubt whether it actually would make a difference perceptible to a human. Playing with the app on budoco.net, it's very fast. My experience tells me that the most important speed optimization is to reduce the number of trips between web server and postgres, even if they are on the same machine. Right now, it's very chatty between them. So, for example, just bringing up the create issue form, empty: SQL 1:/check_user_permissions/ select * from sessions The contents of the dropdowns only change if an admin changes them, so they could all be cached at Startup and then we'd make the cache dirty whenever admin updates them, which is almost never. |
SQL 1:select i_organization from issues where i_id = 4030 Here's getting the posts of an issue that has three posts. N+1 problem here. Instead of fetching attachments three times should do it once. |
For js. Using the method after loading the page.
|
|
Something like that? |
A DataSet can also contain multiple tables. |
If you were working with BugTracker.NET source code, then you must know that I know all this stuff. |
Most likely I don't quite understand the question. |
I don't remember asking a question. I don't have a question. |
|
The question is in its broad sense. No question mark after a sentence. The question may be even if it was not asked. ;) |
Sorry. I am not a native speaker, so I cannot accurately convey the idea. |
done |
👍 |
Something exciting happened. I now see the error I had that made me move the scripts into . Try the "Go To Issue" button. |
moved the js that was in head to bottom of body and it works. I guess I don't understand $(document).ready... |
|
Actually, my comment was stupid. I do know what document ready does. I shouldn't have said that. Here's what I should have talked about: https://stackoverflow.com/questions/1795438/load-and-execution-sequence-of-a-web-page So, in the past, I had always put libraries and my own <script> tags in head, and never had a problem. You convinced me it's better to put them at the bottom of body, but I guess that means I also need to put <script> in body following <script src=>. The error I had was that jquery itself hadn't been loaded when my head was calling $(). I think I got it now. |
Was my change the correct fix? |
Yes. Libs then general scripts then specific scripts. |
And then "Scripts" section. |
Page loading enhancement.
The text was updated successfully, but these errors were encountered: