ElkArte Community

General => Site Feedback => Topic started by: emanuele on August 27, 2015, 01:35:40 pm

Title: Lag loading css?
Post by: emanuele on August 27, 2015, 01:35:40 pm
It's only me, or the css is loading half a second after the page is generated?
Any time I open a page (here at elk.net), it first appears without any css and then the css is rendered.
It's only me?
Title: Re: Lag loading css?
Post by: Jorin on August 27, 2015, 01:42:35 pm
I have no such problems.  :o
Title: Re: Lag loading css?
Post by: radu81 on August 27, 2015, 01:56:50 pm
Never seen something similar. I use chrome
Title: Re: Lag loading css?
Post by: CrimeS on August 27, 2015, 01:58:10 pm
I only see a lag of loading the icons and recent commits panel.
Title: Re: Lag loading css?
Post by: wintstar on August 27, 2015, 02:33:37 pm
No problem, Firefox and Edge.
Title: Re: Lag loading css?
Post by: Flavio93Zena on August 27, 2015, 02:38:44 pm
No problems (and I'm probably the most important for ya, since we are quite close geo-wise) :P
Title: Re: Lag loading css?
Post by: Spuds on August 27, 2015, 04:48:51 pm
seamonkey :P
Title: Re: Lag loading css?
Post by: Flavio93Zena on August 27, 2015, 04:50:48 pm
I was about to like the message but then I  thought... "Hey, I'm Italian like Emanuele! Fu! xD"
Title: Re: Lag loading css?
Post by: emanuele on August 27, 2015, 05:06:43 pm
/me feels Flavio doesn't know what seamonkey is...
Anyway I feel it's because I have the ftp client uploading at full speed messing up my connection... :-\
Title: Re: Lag loading css?
Post by: Spuds on August 27, 2015, 05:08:59 pm
Yeah just kidding around with emanuele, he is known to run some interesting os/browser configs  O:-)
Title: Re: Lag loading css?
Post by: Flavio93Zena on August 27, 2015, 05:43:41 pm
Lol, misunderstood it indeed, as I don't even consider that a brows.. ehm, yeah ::)
Title: Re: Lag loading css?
Post by: Jorin on January 26, 2016, 01:34:25 am
Today I experience a lag in loading the page.

Edit: It's better now.
Title: Re: Lag loading css?
Post by: emanuele on January 26, 2016, 02:22:28 am
Quote from: Flavio93Zena (#OpIsis) – Lol, misunderstood it indeed, as I don't even consider that a brows.. ehm, yeah ::)
Without SeaMoney (code name of the original Mozilla Suite, original source of Firefox) you'll likely still be using IE6. :P

Quote from: Jorin – Today I experience a lag in loading the page.

Edit: It's better now.
I noticed that myself, hopefully we were just the unlucky ones being hit by the rebuild of the css and js cache. :)
Title: Re: Lag loading css?
Post by: Jorin on January 26, 2016, 02:36:20 am
Try to fix this please by adding a bug for greater lag of loading times! Sounds positive!  ;)

I have to be careful... You might warn me if I make too much jokes like this.  :-[
Title: Re: Lag loading css?
Post by: Nifty on January 26, 2016, 07:42:56 am
elkarte.net is lagging since yesturday for me :(

Title: Re: Lag loading css?
Post by: emanuele on January 26, 2016, 07:45:27 am
@TE any idea? O:-)
Title: Re: Lag loading css?
Post by: TE on January 26, 2016, 07:55:52 am
no, sorry.. No idea what's wrong.. maybe temporary load issues with the host / datacenter?

QuotePage created in 0.042 seconds with 17 queries.
Title: Re: Lag loading css?
Post by: Nifty on January 26, 2016, 11:02:13 am
Yeah, it was ok, but now again
Title: Re: Lag loading css?
Post by: Jorin on January 26, 2016, 11:41:06 am
Yap!

Page created in 6.712 seconds with 24 queries.

Page created in 18.678 seconds with 12 queries.
Title: Re: Lag loading css?
Post by: emanuele on January 26, 2016, 12:08:17 pm
Yeah, generalized slow-loading here as well now:
Page created in 10.201 seconds with 18 queries.
Page created in 20.064 seconds with 23 queries. (posting a message)
Page created in 5.054 seconds with 24 queries.

Intermixed with stuff like the normal behaviour:
Page created in 0.041 seconds with 22 queries.

Seems to be somehow consistent (when it happens) in the php code after the query:
Code: [Select]
         SELECT permission, add_deny
         FROM {db_prefix}_board_permissions
         WHERE (id_group IN (2, 8)
            )
            AND id_profile = 5

Administrators are not affected because the query is not run for them.
Title: Re: Lag loading css?
Post by: Joshua Dickerson on January 26, 2016, 12:47:32 pm
Enable the MySQL slow query log
Title: Re: Lag loading css?
Post by: emanuele on January 26, 2016, 03:37:51 pm
I said "in the php code after". ;)
The queries are all fine, it's the block of code between the two queries (or at least it was, now seems to be running fine).
This is the detail of the debug I was looking at:
Code: [Select]

         SELECT permission, add_deny
         FROM elkarte_permissions
         WHERE id_group IN (2, 8)
           
   in .../sources/Load.php line 737, which took 0.00011396 seconds at 0.00559998 into request.

         SELECT variable, value, id_member, id_theme
         FROM elkarte_themes
         WHERE id_member = 2
            AND id_theme = 1
   in .../sources/Load.php line 1259, which took 0.00018001 seconds at 5.01269984 into request.
See?
The two queries were running smooth, but the "time into request" suddenly dropped from microseconds to 5 seconds.
That means some php code was wasting a lot of cycles.
The first query is run in loadPermissions, while the second is in loadTheme.The only things done between the two is banPermissions and loadBadBehavior.
Now, banPermissions doesn't seem to do anything that can result is 5 seconds of processing.
While loadBadBehavior should not be loaded for moderators, and in theory I am a moderator, so either the problem is not in badBehaviour or there may be still some case where moderators are not recognized as such. In any case I'm not a BB expert so I don't know if the code could end up into some odd scenario producing such result.
Title: Re: Lag loading css?
Post by: Nifty on January 26, 2016, 04:08:36 pm
Any other Processes on the machine that might wast resources ? That would look the same.  php is getting slow be course other processes take to much time.
Title: Re: Lag loading css?
Post by: Spuds on January 26, 2016, 07:22:44 pm
Only thing I can think of on BB is the HTTP::BL list .. not sure if a slow response to that service could slow things ... not sure when it calls that either. 
Title: Re: Lag loading css?
Post by: TE on January 27, 2016, 12:19:39 am
It's reproducible by clearing the cache via admin interface....

Edit: Everytime I clear the cache (even if it's completely disabled) creating the pages takes up to 3-4 seconds for a non used action.. (e.g. board index, message index, pm ...)
Title: Re: Lag loading css?
Post by: Joshua Dickerson on January 27, 2016, 01:37:05 am
For one where there is no $_GET['action'] set?
Title: Re: Lag loading css?
Post by: SpeedFreak on January 27, 2016, 06:18:47 am
css combined causing it?

btw I have no lag @ loads.
But I also run a semi odd browser setup. no cache, and a ton of other stuff.
Title: Re: Lag loading css?
Post by: emanuele on January 27, 2016, 07:14:59 am
Quote from: TE – Edit: Everytime I clear the cache (even if it's completely disabled) creating the pages takes up to 3-4 seconds for a non used action.. (e.g. board index, message index, pm ...)
That one is likely the creation of the minified js/css if it is only "the first time". But the one that was happening a yesterday was consistent on any page (even with some reloads), not only on the first one of a type.
Spuds' idea HTTP::BL could be, a random slowdown on an unrelated service is quite an easy way of finding an difficult-to-debug issue, though the odd thing is that BB should not be run for moderators, and I am a moderator and I was experiencing the slowdowns... unless there is again a bug in recognizing moderators...
Title: Re: Lag loading css?
Post by: Jorin on January 27, 2016, 07:38:23 am
Quote from: emanuele – ...unless there is again a bug in recognizing moderators...

Mission accomplished!  :D

No, just kiddin'. You all do an amazing job here! Thanks a lot to all working with the code, the themes and the community!  :)
Title: Re: Lag loading css?
Post by: emanuele on January 27, 2016, 08:07:09 am
Well, it was buggy already, so find that the fix was not perfect wouldn't surprise me. :P
Title: Re: Lag loading css?
Post by: Spuds on January 27, 2016, 09:28:31 am
- Probably not BB then, it you are seeing it as admin / moderator.
- Clear cache also clears the hives, so first hit to a page the css / JS files need to be minified / combined and that cause a one time lag.
- Maybe its the jQuery CDN .... I've read some folks are shifting to the jquery one vs google one ... I'll switch that to local for a test.


I was still seeing some lags with "local" so also shutoff BB for a test ...


Title: Re: Lag loading css?
Post by: Spuds on January 28, 2016, 06:55:26 am
I did not notice any slowdowns after BB we disabled.  I'll turn it back on with BL disabled and see what that does.
Title: Re: Lag loading css?
Post by: emanuele on March 26, 2016, 06:21:08 pm
I'm currently experiencing page loading time between 5 and 20 seconds... :-\

They are more or less random, anywhere, no particular pages, I tried different users but they all were slowed down.
Title: Re: Lag loading css?
Post by: radu81 on March 26, 2016, 08:01:55 pm
I also noticed yesterday, and I thought it was my connection since a torrent client was in use.
Today I got some pages loading in 10-15 seconds, and after browsing 2 slow pages the third (this one) was loaded in 0,058sec

this was for the topic with 1.07 patch: Page created in 10.816 seconds with 29 queries.
Title: Re: Lag loading css?
Post by: emanuele on March 27, 2016, 05:37:39 am
I guess it was some server maintenance.
Title: Re: Lag loading css?
Post by: Frenzie on March 27, 2016, 06:16:38 am
Yeah, page loading time last night was pretty bad.