A few small changes.

News and announcements about the Forum and Web Site will be posted here.
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

Hey check this. I ran a few speed tests, using a moderate network connection (3G I think) from Florida (nearest to northern GA that they had).

https://www.webpagetest.org/result/1911 ... 95af6d4e6/

The diagram shows the load processes for a first visit to the forum (ie: no cookies set, no files cached). It's interesting stuff.
  • The server can have 6 parallel connections downloading stuff, so a maximum of 6 files downloading at the same time.
  • This means if you can halve the number of files by amalgamating tiny ones, things go faster. (0!!0)
  • Actual HTML only takes 1.1 seconds to download. The rest of the waiting time is all the other crap.
  • The first CSS file to download is stylesheet.css. That's the one that wastes a request, because it only contains @import rules for other files (which download much later), so this is all wasted time. If this file was ditched that would save 1/3 of a second right there.
  • The second CSS file to download is for the Font Awesome icons, and it holds up a connection for 2/3 of a second. But, it's useless until the actual font file it applies to is loaded, and that isn't downloaded until much later (number 39 on the list). And all it does is make a handful of cute little icons anyway. So font-awesome.min.css is a prime candidate for deferred downloading. It's early place in the queue could be taken by something more immediately useful.
  • The next file (theme/en/stylesheet.css) only does one thing. It puts the little diagonal "Online" stripe to the right of your avatar if you're online. To do that, it holds up a connection for half a second. This is rather stupid. :lol: It would make more sense to put that tiny amount of code at the end of one of the later files.
  • The next one to hit the queue is cookieconsent.css, which holds up a connection for another half a second. But, the cookie consent form relies on javascript to run, and the javascript won't function until the DOM Content Loaded event, which happens 2.7 seconds later. IOW, this CSS file could be deferred too.
  • Buttonmenu.css is up next, and this one is actually useful (does the top site menu bar). Yay! :mrgreen:

  • The next one is postingbuttons.css. That one isn't required at all on most pages. It's only used when you're actually using the replies editor. It could usefully be removed from the head of the page, and called lower down in the posting template.
  • Similar situation for quotethumbnails.css (#8). It's only used when you're inside a thread, so there's no point calling it anywhere else. Same goes for #11 (lightbox.css). Lightbox.css is useless without lightbox.min.js (#20) anyway, so these should ideally only be called inside threads.
  • Numbers 9 and 10 (collapsiblecategories.css and boardannouncements.css) are useful early in the game, so probably leave those alone.
  • Now we get to the first on the javascript files (jquery.min.js) and apart from the jpg banner it's the biggest file of the lot. For one thing, this beast could have been downloading 0.4 seconds earlier if the less important files before it were rationalised. For another thing, there's a handy trick you can do with javascript files. You can set them to defer:

Code: Select all

 <script src="demo_defer.js" defer></script> 
What this does is stop them blocking other files while they are downloading, so effectively it makes more connections available. In other words, if all 9 javascript files are set to defer, normalize.css (#21) would start downloading 0.8 seconds earlier.
  • The other point is that at the moment I have the javascript for assigning the multiple Prosilver Dark Edition stylesheets after jquery.min.js and some of the other javascript files. If I put it in front that should reduce the "flash of unstyled content" problem with PSDE.
  • Normalize.css and the next 10 CSS files are the ones that were called by @import in the stylesheet.css back at #2, but it's only now they get around to beginning to download. Something tells me this is not optimal. *!*!*! And again, if some can be amalgamated that will free up connections.
  • #33 is the one smiley I put in the board announcement, and by itself that blocks a connection for 1/3 of a second. By this time we're out to around 3.4 seconds since first contact, and could easily have knocked that back to under 2 seconds (even with the smiley).
  • The rest of the time until completion is images and the Font Awesome font file. Site-logo-mine.gif will be disappearing, to be replaced with text that is part of the banner image.
  • The banner itself could be optimised some more, and that could probably knock off another half a second until page completion.
  • The remaining images aren't a big deal at this stage.
So there ya go. Looks like a 5 second time to completion could be cut down to about 3 seconds. !*th_up*!

Edit: Oh yeah, while I think of it, Font Awesome has around 700 icons, and phpBB only uses less than 1/3 of them, so in theory font-awesome.min.css could be cut in size by around 2/3 by getting rid of rules for icons that aren't used. And then the rest of the CSS and javascript files can be minified too, which is not at all difficult and can save even more time.
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

It looks like that test runs on the default style. Maybe set the PsDE to default temporarily and run the test again on it, just for scientific testing purposes.
That is, unless you already know everything you need to know.
Hawk
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

Ok, running that test now. :)
Edit: First test results.
Connection chosen as "DSL (1.5Mbps/384Kbps 50ms RTT)" from Orlando, Florida.
3 different runs, with massively different completion times, varying from 4.9s to 14.0s.
https://www.webpagetest.org/result/1911 ... ce7778e1d/
  • The second run, with a 14.0s time to completion on first view, appears to be an anomaly. Most files downloaded normally, but yellow.css somehow got blocked up by eddies in the space-time continuum and took yonks to download. It's only tiny, like the other colours files, so there must have been a blockage in the network.
  • The third run appears to be a close match for the previous test with the default Prosilver. But I'd actually expect Prosilver Dark to be slightly slower anyway due to the extra CSS files it contains, along with a tiny bit of extra javascript.
  • This is how the CSS files for colours are listed in the head of the page:

Code: Select all

<link href="{T_THEME_PATH}/colours/grey.css?assets_version={T_ASSETS_VERSION}" rel="alternate stylesheet" title="grey">
<link href="{T_THEME_PATH}/colours/blue.css?assets_version={T_ASSETS_VERSION}" rel="alternate stylesheet" title="blue">
<link href="{T_THEME_PATH}/colours/green.css?assets_version={T_ASSETS_VERSION}" rel="alternate stylesheet" title="green">
<link href="{T_THEME_PATH}/colours/orange.css?assets_version={T_ASSETS_VERSION}" rel="alternate stylesheet" title="orange">
<link href="{T_THEME_PATH}/colours/pink.css?assets_version={T_ASSETS_VERSION}" rel="alternate stylesheet" title="pink">
<link href="{T_THEME_PATH}/colours/purple.css?assets_version={T_ASSETS_VERSION}" rel="alternate stylesheet" title="purple">
<link href="{T_THEME_PATH}/colours/red.css?assets_version={T_ASSETS_VERSION}" rel="alternate stylesheet" title="red">
<link href="{T_THEME_PATH}/colours/yellow.css?assets_version={T_ASSETS_VERSION}" rel="alternate stylesheet" title="yellow">
<link href="{T_THEME_PATH}/colours/snowy.css?assets_version={T_ASSETS_VERSION}" rel="alternate stylesheet" title="snowy">
<link href="{T_THEME_PATH}/colours/green_light.css?assets_version={T_ASSETS_VERSION}" rel="alternate stylesheet" title="green_light">
  • Based on that, I'd expect grey to load first. It's the one set by default if there is no user cookie already set. But it doesn't load until #42 on the queue, which is 0.4 seconds after orange.css. Beats me why, but that's what happened.
  • Grey.css will be the one that shows all the post content, and it's still loading after the DOM Content Loaded event (which is when the javascript sets the colour) so that's a flash of empty posts right there. Looks to be around 0.2 seconds.
  • Oh, and basic rendering starts around 1 second earlier than grey.css starts to download. *!*!*!
  • So here's a thing. Alternate stylesheets aren't applied, even though they are all downloaded. One doesn't get applied until DOM Content Loaded, so it's critical that the required sheets is available then to minimise "empty stuff everywhere".
  • The banner is downloading at #35, then the board announcements close.png at #36, then the wink smiley at #37. That's the order they would appear in the markup, so that makes sense.
  • Normally stylesheets would be downloaded in the order they are listed in the head of the page, but maybe having them declared as "alternate" screws with this. Blue.css is listed first after grey.css, yet for some reason blue.css was the last to connect and download, even though it was "discovered" at the same time as grey.css.
  • And all of the alternate colours stylesheets are not downloading until after the banner, close.png and wink smilley, even though the stylesheets are called in the head and the images obviously aren't called until you're into the body.
  • This is a PITA, because you really want the stylesheets loaded first, so something has to be done about that. At the moment I'm not sure what is required. *!*!*!

  • The repeat view for this run (ie: with files and cookies already cached) comes in at 2.1 seconds.
  • Basic rendering starts at 1.53s, and the style isn't set until 1.85s, so that's a third of a second of empty posts there. Which makes sense given what we've been seeing, and pretty much ties in with the results from the first view. Overall time to completion is around half, and so is time between first render and the colour stylesheet being set.
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

Second test results.
Connection chosen as "DSL (Cable 5/1Mbps 28ms RTT)" from Orlando, Florida.
3 different runs, with completion times varying from 2.9s to 5.5s.
https://www.webpagetest.org/result/1911 ... 60f496ceb/
  • The longest time of 5.5s seems to be more web gremlins. DNS took about 2.4 seconds to get its act together. The previous test on the slower connection was getting DNS times around 0.2-0.3 seconds, so the 5.5 seconds time to completion on DSL/Cable looks like an anomaly.
  • The other two runs are grouped pretty closely each side of 3 seconds, so that's probably about where the benchmark should be for cable.
  • Working through Run #2 (3.2s to completion) there are some weird things happening. Hey, it's the internet. :lol:
  • This time the wink smiley for the board announcement has jumped the queue and is butting in at #12. No idea how that happened, and it's definitely not optimal behaviour.
  • The rest of the files seem to be following pretty much the same load order as previous runs.
  • The alternate colours CSS files are downloading in (exactly) the same strange jumbled order as before. Appears to be no logic to it, but there must be in computer terms.

Code: Select all

 5th to download: <link href="{T_THEME_PATH}/colours/grey.css" title="grey">
10th to download: <link href="{T_THEME_PATH}/colours/blue.css" title="blue">
 3rd to download: <link href="{T_THEME_PATH}/colours/green.css" title="green">
 1st to download: <link href="{T_THEME_PATH}/colours/orange.css" title="orange">
 2nd to download: <link href="{T_THEME_PATH}/colours/pink.css" title="pink">
 4th to download: <link href="{T_THEME_PATH}/colours/purple.css" title="purple">
 6th to download: <link href="{T_THEME_PATH}/colours/red.css" title="red">
 9th to download: <link href="{T_THEME_PATH}/colours/yellow.css" title="yellow">
 8th to download: <link href="{T_THEME_PATH}/colours/snowy.css" title="snowy">
 7th to download: <link href="{T_THEME_PATH}/colours/green_light" title="green_light">
  • Grey.css (the one that will be applied in this case) is still downloading after DOM Content Loaded (when the javascript sets the colour).
  • This will give approximately 0.15s of missing content, from start of rendering at 2.6s to grey.css fully downloaded at 2.75s. Which is getting down to human reaction times (for a younger human than me) so isn't too bad, but could obviously be better if that file could be downloaded earlier.
  • In this run it look as if deferring the javascript files would be enough to get all the CSS files loading before rendering starts, which is obviously what you want in an ideal world.

Another idea. I don't think we'll ever want all of the dark variations, and there are 8 of them, and each variant file is less than 2Kb. It might be worth just using four or five of them, and putting the code for them in dark.css. This means always loading more CSS than is strictly required, but on the other hand it's not that much and it saves downloading extra files. The colour change can be done by using the javascript to append a class to the body tag. So body.grey in the CSS would call grey links, etc, while body.red would call red ones. Looking at the waterfall for this run, I think that trick could get styling sorted in next to no (visible) time. !*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

RulerofRails wrote: Tue Nov 05, 2019 1:07 amOff-topic: What are the restrictions on the advanced search and ignored words? Some words like "industry" are ignored. Which maybe is fine because who would search just that. But sometimes when I do a search I want to put something like "industry profit" and it's not possible from what I can tell. Is that something that saves server bandwidth (a good thing). I have no idea, just wondering if the update did anything for search capabilities?
I think I have this sorted now. The way it works is a bit bonkers. There's an admin setting for "ignore words that are too common" and it works off the percentage of posts they appear in. So you might think that if you set it to 10% it would only skip words that were in 10% or less of posts, and would index any words that were in 90% or more of posts.

It's the other way around though. It will skip any words that are in a greater percentage of posts than what you set in admin. So if you set it to 2%, it will skip any words that are in 3% or more of posts. So I've just set it to 33% for a trial run, which should hopefully mean that words we want to find will be easier to find.

The other thing I forgot before is that for the new setting to work you have to delete the old search index and build a new one, because otherwise existing posts are still indexed under the old setting. I've now done that too. Give the search another few test runs and see if you like it better now. !*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

Testing attachments with Lightbox. Lots more text. Hey I have a keyboard. Isn't it awesome? I got it for Christmas.
__Fablok_BT-123_for_LVD.jpg
__An_27_ex_SBB.jpg
__An_28 ex-SBB A2_4 no.114.jpg

Sed feugiat enim dui, nec placerat lacus scelerisque non. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nulla dapibus eget metus sit amet feugiat. Sed mattis augue eget mauris convallis, eu fringilla dolor porta. In nunc dui, mattis ac viverra sit amet, congue eget nisl. Ut in egestas dui. Nullam ac dui a purus ultricies cursus. Donec ac aliquet tellus. Donec pretium, elit et mollis aliquam, massa tortor egestas felis, malesuada hendrerit tortor lacus vitae diam. In sed fringilla arcu. Proin lacinia ex sit amet magna efficitur commodo. Mauris aliquet massa eget enim finibus hendrerit.
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

Testing non-inline standard attachments.
Attachments
__LVD_choofs.txt
(6.73 KiB) Downloaded 36 times
__LG_choofs.txt
(4.61 KiB) Downloaded 36 times
__EVR_choofs.txt
(1.71 KiB) Downloaded 41 times
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

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce volutpat felis ut blandit mollis. Sed sed augue dignissim, viverra nulla quis, hendrerit orci. Phasellus ut ex in ex facilisis tincidunt. Proin consequat ornare felis, non consectetur lectus interdum id. Duis lacinia sodales ipsum, sed porttitor metus vulputate eu. Nunc nibh lectus, blandit eget euismod sit amet, pharetra non est. Praesent dignissim posuere mi sed tempus.
Sue_Veneer_Dunnamy_1_06_08_2016.jpg
Peace_(1902)_1_09_08_2016.jpg
Archduke_Charles_09_08_2016.jpg

Sed feugiat enim dui, nec placerat lacus scelerisque non. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nulla dapibus eget metus sit amet feugiat. Sed mattis augue eget mauris convallis, eu fringilla dolor porta. In nunc dui, mattis ac viverra sit amet, congue eget nisl. Ut in egestas dui. Nullam ac dui a purus ultricies cursus. Donec ac aliquet tellus. Donec pretium, elit et mollis aliquam, massa tortor egestas felis, malesuada hendrerit tortor lacus vitae diam. In sed fringilla arcu. Proin lacinia ex sit amet magna efficitur commodo. Mauris aliquet massa eget enim finibus hendrerit.
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

Standard image attachment.
Attachments
__VR_Tv6_small.jpg
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

Custom icon.jpg
Custom icon.jpg (3.7 KiB) Viewed 634 times
When working on a map I often have the game running twice. One to "mock things up"/test and the other to make actual changes. I have gotten mixed up too many times over which install is which. Making a shortcut isn't enough. I had to copy the exe and then make a shortcut for the copied exe. Ofc idk how to change the exe icon directly. I ripped this image from something copyright, so it's not for general distribution, but I thought it's sort of "cool".

PS. Yes I do try to work on SCBC as ambition/time allow, in other words: occasionally. Maybe one day it will be finished.
Attachments
Custom icon - Copy.jpg
Custom icon - Copy.jpg (3.7 KiB) Viewed 634 times
Last edited by RulerofRails on Mon Nov 09, 2020 11:11 pm, edited 1 time in total.
Post Reply