Latest topics
» Hello everyone this is Adam from France
by Milouze14 Tue 21 Nov 2017, 13:23

» Auto-suggest @mentions as You Type
by T.C. Tue 21 Nov 2017, 12:36

» Personal Rank Titles
by T.C. Tue 21 Nov 2017, 12:04

» FM Themes
by SLGray Tue 21 Nov 2017, 01:08

» User - Made Creations
by SLGray Tue 21 Nov 2017, 01:07

» Search box only visible on hover
by SLGray Tue 21 Nov 2017, 00:58

» Browsers & Updates
by SLGray Tue 21 Nov 2017, 00:56

» Change newposts/no new posts/ locked icons
by T.C. Mon 20 Nov 2017, 19:52

» [HELP] About Profile Cover Code
by MaHwOs Sun 19 Nov 2017, 18:54

» bloquer un membre
by berlingo Fri 17 Nov 2017, 18:19

» IconSkouliki Graphics
by skouliki Fri 17 Nov 2017, 03:54

» [IN PROGRESS] Can this code work on pun version
by skouliki Thu 16 Nov 2017, 03:50

» [TUTORIAL] [ALL VERSIONS] Warning before posting
by demon99 Wed 15 Nov 2017, 08:12

» About Add Reply & New Topic button (popup form)
by omarpop23 Mon 13 Nov 2017, 20:31

» Add a login popup for the toolbar
by Ape Sun 12 Nov 2017, 18:41

Recent Tutorials
Who is online?
In total there are 9 users online :: 0 Registered, 0 Hidden and 9 Guests :: 1 Bot

None

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

Web Page Speed & Optimization for FAE

View previous topic View next topic Go down

avatar
Dr Jay

Title :
Power of Youth!
Gender : Male
Posts : 153
Points : 608
Reputation : 34
Location : USA
Language : English (Native)
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.geekpolice.net

PostDr Jay on Thu 20 Apr 2017, 14:42

Hello hello beloved friends of FM Design! Very Happy

I have begun this topic to kick-start the process of discussion for speed and optimization for Forumactif Edge.

I would recommend this be a topic for general discussion, instead of actual support only; therefore, it is placed in the main forum for FAE.
  • In evaluating much of the criteria for FAE, I have noticed several things in evaluation of domains using FAE. I hope this can provide all of us insight for how this theme operates on our forums and be able to prepare it better for the web.
  • Keep in mind that optimization and speed-boosting means a lot to many people, and if you want people to have a good experience using your forums, it is better to speed it up to avoid lag.
  • Most Desktops will handle requests for FAE quickly, but I have noticed a growing trend of some forums using FAE on mobile devices having a slowdown or lag, especially with more plugins.





Here are some things for discussion then:
  • Hosting images from a cookie-less domain (Servimg, Imgfast, and Illiweb, both FM's core image hosting sites, have cookies on each of those domains).
  • Hosting plugins, CSS, and JS on a CDN (content delivery network) and what network do you use.
  • Making images and resources hosted across multiple domains instead of a single domain. (Much of our images are hosted on the same 1-3 image download sites... 10 or more would be better.)
  • Static resources not containing a query (question marks in URLs when not necessary to have)
  • Inhibiting response codes, especially 307s or 302s on some domains (internal/external redirects).
  • Minimizing the use of images, but improving the overall design (combining images and using image maps).
  • Reducing or combining scripts such as JS and CSS, minifying, etc.
  • Minimizing requests for images and resources by modifying expiration times.
  • Any other things?

--------

~Dr Jay
avatar
Dr Jay

Title :
Power of Youth!
Gender : Male
Posts : 153
Points : 608
Reputation : 34
Location : USA
Language : English (Native)
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.geekpolice.net

PostDr Jay on Sun 23 Apr 2017, 02:25

0 bump... Any ideas? Smile

--------

~Dr Jay
avatar
dannig

Title :
I always create, I never keep.
Gender : Female
Age : 30
Posts : 36
Points : 312
Reputation : 11
Location : Brazil
Language : English, Brazilian-Portuguese
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.novabrasilis.forumeiros.com https://www.facebook.com/dannielaaragao https://twitter.com/dannielagoes

Postdannig on Sun 23 Apr 2017, 08:15

I'm hosting most of my custom CSS on dropbox because FAE takes a lot of the character limits from the built in CSS, but I don't feel a difference on the speed. I think the less a board depends on scripts, the faster it'll be, but I do love the extra features that FM doesn't have but those codes provide.

Honestly I think it's pretty quick, but machine and connection speed will always be a factor that may or may not help.
avatar
Dr Jay

Title :
Power of Youth!
Gender : Male
Posts : 153
Points : 608
Reputation : 34
Location : USA
Language : English (Native)
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.geekpolice.net

PostDr Jay on Sun 23 Apr 2017, 14:19

It also depends, however, on the speed of the server in which you are hosting. I have believed JSDelivr is one of the quickest in ping rates, which, in turn, might be the best solution.

--------

~Dr Jay
avatar
dannig

Title :
I always create, I never keep.
Gender : Female
Age : 30
Posts : 36
Points : 312
Reputation : 11
Location : Brazil
Language : English, Brazilian-Portuguese
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.novabrasilis.forumeiros.com https://www.facebook.com/dannielaaragao https://twitter.com/dannielagoes

Postdannig on Mon 24 Apr 2017, 10:02

I never tried it, I use dropbox because I basically edit my CSS without refreshing anything but the board, I like it's convenience. And it's free.
avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 22
Posts : 4712
Points : 9589
Reputation : 2341
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Mon 24 Apr 2017, 11:39

That's a lot of good advice for improving performance. I think probably one of the most important things ( in regards to scripting ) is to make use of asynchronous loops, instead of synchronous ones which can block the page for just a bit. Eventually all the tiny things really add up. Think

I've been playing around w/async loops recently and even attempted writing my own for a project. This is the code :
Code:
function ForAll (list, callback) {
  this.list = list;
  this.callback = callback;
  this.iterate();
};

ForAll.prototype.index = -1;
ForAll.prototype.status = 'looping';

ForAll.prototype.iterate = function () {
  if (this.list[++this.index]) {
    this.callback(this.list[this.index]);

    var self = this;
    setTimeout(function () {
      self.iterate();
    }, 0);

  } else {
    this.status = 'done';

    if (this.doneCallback) {
      this.done(this.doneCallback);
    }
  }
};

ForAll.prototype.done = function (doneCallback) {
  if (doneCallback) {
    if (this.status == 'done') {
      doneCallback();

    } else {
      this.doneCallback = doneCallback;
    }
  }
};

and using it :
Code:
new ForAll(document.getElementById('fa_theme_selector').options, function (option) {
  console.log(option.value);

}).done(function() {
  // optional callback to execute when the loop is finished
});


Compared to the traditional for loop it is a tad slower when timed in the console. Only perk is that it doesn't block other code from executing. This for loop will only write "HELLO WORLD" after it's finished :
Code:
console.time();
console.log('HELLO');

for (var option = document.getElementById('fa_theme_selector').options, i = 0, j = option.length; i < j; i++) {
  console.log(option[i].value);
}

console.log('HELLO WORLD');
console.timeEnd();

This async loop will write "HELLO WORLD" as soon as it can be executed :
Code:
console.time();
console.log('HELLO');

new ForAll(document.getElementById('fa_theme_selector').options, function (option) {
  console.log(option.value);

}).done(function() {
  console.timeEnd();
});

console.log('HELLO WORLD');

There's definitely better alternatives, but I thought it'd make a good example. Of course this isn't applicable everywhere though. I think it's best used on loops that affect page load or loops that are executed recursively.
avatar
Dr Jay

Title :
Power of Youth!
Gender : Male
Posts : 153
Points : 608
Reputation : 34
Location : USA
Language : English (Native)
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.geekpolice.net

PostDr Jay on Mon 24 Apr 2017, 13:37

@dannig wrote:I never tried it, I use dropbox because I basically edit my CSS without refreshing anything but the board, I like it's convenience. And it's free.
Yes, true, but JSDelivr is also free. That's a great benefit! However, it is incorrect to assume you can obtain extraordinary results using free CDNs. It's like trying to use free VPNs... Something is missing from the whole "speed" factor. The adage goes... If it has to jump through too many loops, it won't make it back in a reasonable time.

I agree @Ange Tuteur - and many of your suggestions/examples are nice as always. I will think on these thinks. I wish we had a server cache/cookie clear... But these boards don't work like that. Smile

On FM boards, async is almost always helpful, especially as I have tried it, as have you, and it has worked wonderfully. Per the issues of blocking, it appears that placing JS inline would be better to do for the resources that need to be fetched on every page reload, and offloading JS to the JavaScript Codes Management to host in or on a CDN, and allowing async to be done. If we place it on a CDN, we can most definitely force async to operate how we want it to. I have a feeling the difficulty of JavaScript Codes Management may cause inferior results.

One final note of mine on JSDelivr... FM boards use JSDelivr for a few small resources, so you will notice information being fetched from that server, but it should not cause any issues with setting up a CDN of your own. Bravo !

--------

~Dr Jay
avatar
dannig

Title :
I always create, I never keep.
Gender : Female
Age : 30
Posts : 36
Points : 312
Reputation : 11
Location : Brazil
Language : English, Brazilian-Portuguese
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.novabrasilis.forumeiros.com https://www.facebook.com/dannielaaragao https://twitter.com/dannielagoes

Postdannig on Thu 27 Apr 2017, 18:31

As continuation to my post here: http://fmdesign.forumotion.com/t1326-bootstrap-compatibility#30132

I decided to try the github pages feature to host iframes to my forum, but the synchronization is not automatic and, being my machine only an i3, it felt a bit heavy on the system. I was able to make it work (note that I'm almost a complete ignorant when it comes to programming), but that lack of speed on changes bugged the hell outta me.

Found out about FTPbox, though it's an abandoned project, the software kept crashing. That's when I found out that WinSCP does the synchronization work, I am still able to change my dropbox files, but this time they are automatically uploaded every change I do.

I'm trying to minimize the impact of hosting pages that doesn't require the top of the forum on FM as I'm doing with the CSS and some JS. Though I do believe that the large amount of JS I have there might do some weight on the board's overall speed.
avatar
Dr Jay

Title :
Power of Youth!
Gender : Male
Posts : 153
Points : 608
Reputation : 34
Location : USA
Language : English (Native)
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.geekpolice.net

PostDr Jay on Thu 27 Apr 2017, 23:19

Per the last part of your post... Do you mean reducing the content above the fold to optimize the content below the fold?

--------

~Dr Jay
avatar
dannig

Title :
I always create, I never keep.
Gender : Female
Age : 30
Posts : 36
Points : 312
Reputation : 11
Location : Brazil
Language : English, Brazilian-Portuguese
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.novabrasilis.forumeiros.com https://www.facebook.com/dannielaaragao https://twitter.com/dannielagoes

Postdannig on Fri 28 Apr 2017, 08:39

I didn't understand your question, sorry O.o
avatar
Dr Jay

Title :
Power of Youth!
Gender : Male
Posts : 153
Points : 608
Reputation : 34
Location : USA
Language : English (Native)
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.geekpolice.net

PostDr Jay on Fri 28 Apr 2017, 12:35

Sorry... I thought you knew... See here and here.

--------

~Dr Jay
avatar
dannig

Title :
I always create, I never keep.
Gender : Female
Age : 30
Posts : 36
Points : 312
Reputation : 11
Location : Brazil
Language : English, Brazilian-Portuguese
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.novabrasilis.forumeiros.com https://www.facebook.com/dannielaaragao https://twitter.com/dannielagoes

Postdannig on Fri 28 Apr 2017, 21:38

Nooope, I meant I'm trying to host the least amount of changes on my FM board to both see if I increase loading times and if I lower the chances of incompatibility. I do like having information on the fold I think it's easier, but on my case I'm still fighting to make my "homepage message" scrollable like the profile fields on the topics.

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum