A few small changes.

News and announcements about the Forum and Web Site will be posted here.
User avatar
Hawk
The Big Dawg
Posts: 242
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: A few small changes. Unread post

I did notice load times are a bit slower now, but tolerable. The posts are blank for a second or two. I'm in PsDE. I haven't tried any other styles.

Edit 1: Seems to only affect PsDE.
Hawk
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

It usually loads page content almost instantaneously for me, but can be up to a second occasionally. If it was one second all the time I wouldn't tolerate it. If page content load times are consistently one second or longer at your end that's not good enough, so I'll have to think of something else.

What's causing it is the ability to switch colour variants in the footer. That has to run on javascript because phpBB doesn't provide any way of setting it via PHP, and the javascript takes a while to run sometimes.*

I might end up just splitting the colour variants into separate child styles. That way they'd still be selectable in the Quick Style dropdown, and no load time problems.

*Specifically, it's setting the colour variant via a cookie called in the body tag on page load. The content doesn't appear until the cookie loads the relevant stylesheet.
Gumbootz Lokomotivfabrik und Bierkeller

LMR Samson 0-4-0 - Pennsy H3 Consolidation - Custom double tank cars set
User avatar
Hawk
The Big Dawg
Posts: 242
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: A few small changes. Unread post

Ah! Javascript. That explains it. That's why the 1 or 2 second delay. Plus the fact that I'm about 18 hours behind you. ^**lylgh
Actually, I'm not sure where the site server is now. I know it's not down under. ;-) I think you said it's somewhere in the EU.
Hawk
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

It's in Paris. ;) The delays in rendering are due to croissant crumbs in the hard drive. :D

Ok seriously, what sort of connection are you on? I'm going to run some speed tests and see if I can improve the page load performance. If you know roughly what speed your connection is, that would be useful for setting test parameters.

I think I'll set up a test site in a subdomain. That way I can run PSDE as the default style for the test site, and (hopefully) get accurate results.

Edit: Been reading up on javascript trickery. Turns out that the event recommended in the code I used...

Code: Select all

<body onload="set_style_from_cookie()">
...is a problem, because it won't fire until absolutely everything has loaded completely (right down to the last little icon). The MDN docs say:
A different event, load, should be used only to detect a fully-loaded page. It is a common mistake to use load where DOMContentLoaded would be more appropriate.
The difference being that DOMContentLoaded fires as soon as you can actually apply javascript and have it work. So if I change the event to...

Code: Select all

<body onDOMContentLoaded="set_style_from_cookie()">
...then hopefully things will be a lot more user-friendly. I'll set up a test copy so I can mess around without it. !*th_up*!
Gumbootz Lokomotivfabrik und Bierkeller

LMR Samson 0-4-0 - Pennsy H3 Consolidation - Custom double tank cars set
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

@Hawk: is the loading on PSDE any better for you now?

I've tweaked the javascript, and it seems to be smoother and faster at my end. Some page loads are a bit slower than others (vagaries of teh interwebz) but generally it's behaving pretty well for me. If it looks ok for you too, I think we can call it sorted.
Gumbootz Lokomotivfabrik und Bierkeller

LMR Samson 0-4-0 - Pennsy H3 Consolidation - Custom double tank cars set
User avatar
RulerofRails
Dispatcher
Posts: 310
Joined: Sun Dec 08, 2013 1:26 am

Re: A few small changes. Unread post

You didn't ask me.... but I noticed an improvement. I had an up to 0.5 sec time waiting for the text to fill on a full page. Now I don't notice it at all.
Overall loading seems a bit quicker now as well. Of course that may be down to the unreliability of my connection. On my end the current setup seems to be working well. !*th_up*!
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

Oh good. I didn't ask you because you weren't complaining about it, but if it's better then that's a good thing. :D
I can tweak performance up a bit more. I'm currently studying up on that sort of thing. It's quite interesting stuff.

One detail is that phpBB uses @import rules to amalgamate stylesheets into one, like this:

Code: Select all

/*  phpBB3 Style Sheet */

@import url("normalize.css?v=3.2");
@import url("base.css?v=3.2");
@import url("utilities.css?v=3.2");
@import url("common.css?v=3.2");
@import url("links.css?v=3.2");
@import url("content.css?v=3.2");
@import url("buttons.css?v=3.2");
@import url("cp.css?v=3.2");
@import url("forms.css?v=3.2");
@import url("icons.css?v=3.2");
@import url("colours.css?v=3.2");
@import url("responsive.css?v=3.2");
@import url("dark.css?v=3.2");
The theory being that you only have to call the one stylesheet in the head of your page, and it takes care of the other ones. Only problem is it doesn't do any good.
For instance, if first.css contains the following content:

@import url("second.css")

The browser must download, parse, and execute first.css before it is able to discover that it needs to download second.css.
So all it's really doing is adding a pointless request to the server, to tell the browser that oh yeah, it needs to go back to the server to get the other ones. The page would actually load faster if the other ones were just called straight in the head of the page, and stylesheet.css was given the bum's rush. :lol:
Gumbootz Lokomotivfabrik und Bierkeller

LMR Samson 0-4-0 - Pennsy H3 Consolidation - Custom double tank cars set
User avatar
Hawk
The Big Dawg
Posts: 242
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: A few small changes. Unread post

Still seems to be happening for me. It's not that big of a deal really. I just thought I'd mention it. Also, maybe my statement of it being a 1 to 2 second lag was a bit of a stretch. It's more like .5 to 1. Sorry! :oops:

My connection speed is about 30 Mbps (3.75 MBps), for what it's worth.

Shame that '@member_name' doesn't work in phpBB like in other forum software. :-(
Hawk
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

Yes the @ thing can be handy sometimes. Anyway I'll keep tweaking the performance thing. If I can't get it near perfect what I'll do is just split out the ones we want into separate styles, then they can all be enabled in the Quick Style dropdown. The difference between them is only one CSS file, and they can inherit the modified templates from one parent example. So it would be easy to set up and maintain even if there were nominally a dozen separate styles, because really you'd only be maintaining one. That would definitely be lightest for performance.
Gumbootz Lokomotivfabrik und Bierkeller

LMR Samson 0-4-0 - Pennsy H3 Consolidation - Custom double tank cars set
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

Turns out there is a "mentions" extension that lets you tag people: https://www.phpbb.com/customise/db/exte ... _mentions/
I downloaded it for a look. It's awesome. Creates two new CSS files for a few bytes of code each. Whoopee teh performance! :P

But I can put the code in an existing file (of which phpBB has truly awesome amounts) when I can be bothered, and ditch the superfluous ones.
Gumbootz Lokomotivfabrik und Bierkeller

LMR Samson 0-4-0 - Pennsy H3 Consolidation - Custom double tank cars set
Post Reply