FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » FUDforum 3.0+ » Newbie: speed issue?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Newbie: speed issue? [message #16518] Tue, 03 February 2004 18:29 Go to next message
blueview is currently offline  blueview   United Kingdom
Messages: 12
Registered: February 2004
Karma: 0
Junior Member
hi, an newbie to fud just downloaded and installed 2.6 - the installer is a breeze thanks.

Just got a question, a quite important one, re page load speed. When I load a page, it comes up 100% very quickly, but there is a big time lag (during which i can't click on anything or move the scroll bars) while all the images load up - this is very noticeable and I timed it at up to ten seconds on my broadband connection. This happens on my own site and on this one as well and i've tried it from both my home and work pc's with same problem.

Just wondered whether this is a known issue and whther there's anyting i can do to get round it ... hope so .. i love the look of fud.

[Updated on: Tue, 03 February 2004 22:32]

Report message to a moderator

Re: Newbie: speed issue? [message #16520 is a reply to message #16518] Tue, 03 February 2004 20:01 Go to previous messageGo to next message
blueview is currently offline  blueview   United Kingdom
Messages: 12
Registered: February 2004
Karma: 0
Junior Member
Just done a little more investigation. The same prob showed on three or four other fud forums I visited. Surely this is a known issue and there must be a fix somewhere. I've done a search and can't find any relevant help.

As I said before, each page loads very quickly but then there is a discernable lag of 5-10 seconds while all the icons etc load. It definitely isn't the connection at my end as my connection is good on all other sites/forum types. Please help, I so want to use fud, but this loading prob will make it impractical.
Re: Newbie: speed issue? [message #16522 is a reply to message #16520] Tue, 03 February 2004 22:31 Go to previous messageGo to next message
blueview is currently offline  blueview   United Kingdom
Messages: 12
Registered: February 2004
Karma: 0
Junior Member
Looks like it's something to do with the version number, both of these are ver 2.3.7 and fly very quickly

http://forum.aspseek.org
[url=http://forum.php-mag.net/]

Whereas these two are painfully slow:
http://www.sputnik.com/forum/
http://forum.mediaminer.org - as is this very site.

Can anyone explain why this is and how I can get 2.6.0 running smoothly.

[Updated on: Tue, 03 February 2004 23:19]

Report message to a moderator

Re: Newbie: speed issue? [message #16524 is a reply to message #16522] Wed, 04 February 2004 00:58 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Are you using internet explorer?

As you might have noticed FUDforum uses png images for the various icons. Unfortunately, despite png being ratified as the defacto web graphics standard it is not yet fully support by microsoft browsers. In particular the alpha-transparency of Png images. To implement this a somewhat slow Javascript code is used to emulate the functionality supported normally by other browsers. This is a little slow, but JavaScript code runs fine on my fairly dated Celeron 500.


FUDforum Core Developer
Re: Newbie: speed issue? [message #16530 is a reply to message #16524] Wed, 04 February 2004 09:09 Go to previous messageGo to next message
blueview is currently offline  blueview   United Kingdom
Messages: 12
Registered: February 2004
Karma: 0
Junior Member
Yes I am running ie6.

I didn't realise that the icons were png's ... just had a look and for example the tree view and post buttons appear to be gif's and these are among the images that take forever (like i say 5-10 seconds to download).

I scrapped my 2.6 install and downloaded 2.5x and installed that instead. 2.5x is very quick, no problems -- does 2.5x and before not contain the javascript you were talking about?

I tried 2.6 on four different pc's (all running ie admittedly) and the lag was terrible and i find it hard to believe that it's these png's that are causing 5-10 second delays -- if the problem was of that magnitude, surely one would use gifs instead. Any ideas?
Re: Newbie: speed issue? [message #16541 is a reply to message #16518] Wed, 04 February 2004 18:27 Go to previous messageGo to next message
blueview is currently offline  blueview   United Kingdom
Messages: 12
Registered: February 2004
Karma: 0
Junior Member
Update ... tried loading the site using Netscape 7.1 and it flies! so it seems to be an ie problem. what is the problem an how can it be fixed? after all how many people use ie and how many netscape.
Re: Newbie: speed issue? [message #16548 is a reply to message #16518] Thu, 05 February 2004 05:09 Go to previous messageGo to next message
firepages is currently offline  firepages   Australia
Messages: 24
Registered: July 2003
Karma: 0
Junior Member
edit the lib.js file to remove the offending code & edit the .png files to suit your theme...

I could not see an option in admin for deciding whether to use png's or gif's for these images though I suppose you could edit the individual templates ... but what a pain.

I think its daft to have the default behaviour such as to slow the experience of the expected 90% of users. (granted this domain probably gets much less IE but most (including most of mine Wink don't).
Re: Newbie: speed issue? [message #16549 is a reply to message #16548] Thu, 05 February 2004 09:02 Go to previous messageGo to next message
blueview is currently offline  blueview   United Kingdom
Messages: 12
Registered: February 2004
Karma: 0
Junior Member
thanks.

which bits of lib.js do i need to remove/change? and do i need to change the png's to gifs? grateful if you could clarify what i need to do as i don't have much of a clue about such things.

i agree with you, it does seem incredible that this is the default behaviour. fud is great from what i can see, but the download lag makes it impractical/unusable for 90-95% of users out there.

Like I said before, versions pre 2.6 work fine, but the performance of 2.6 stinks on ie.

[Updated on: Thu, 05 February 2004 13:19]

Report message to a moderator

Re: Newbie: speed issue? [message #16550 is a reply to message #16518] Thu, 05 February 2004 14:23 Go to previous messageGo to next message
firepages is currently offline  firepages   Australia
Messages: 24
Registered: July 2003
Karma: 0
Junior Member
in lib.js comment out ( /* code */ )everything below

// This code below is used to make PNG's to work in IE.
// The code comes from youngpup.net. Thanks youngpup!


to the end of the file , dont delete it as someone may post a better solution as this is just a quick hack.

If you do that the png's load fine (and quickly!) but without the transparency , you could edit them in your favorite editor photoshop/fireworks whatever to suit your theme.

Again you could probably change the appropriate templates via admin to use gif's (as gif images are supplied) though I have not looked.
Re: Newbie: speed issue? [message #16551 is a reply to message #16550] Thu, 05 February 2004 15:41 Go to previous messageGo to next message
blueview is currently offline  blueview   United Kingdom
Messages: 12
Registered: February 2004
Karma: 0
Junior Member
thanks, however my lib.js doesn't contain that code ... file i have is below.

/************************************************************************** *
* copyright : (C) 2001,2002 Advanced Internet Designs Inc.
* email : forum(at)prohost(dot)org
*
* $Id: lib.js,v 1.1.1.1 2002/06/17 23:00:09 hackie Exp $
*************************************************************************** *

*************************************************************************** *
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*************************************************************************** /

JS_HELPOFF = false;
/* indentify the browser */
DOM = (document.getElementById) ? 1 : 0;
NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
OPERA = (navigator.userAgent.indexOf("Opera 5") > -1 || navigator.userAgent.indexOf("Opera/5") > -1 || navigator.userAgent.indexOf("Opera 6") > -1 || navigator.userAgent.indexOf("Opera/6") > -1) ? 1 : 0;

/* edit box stuff */
function insertTag(obj, stag, etag)
{

if ( navigator.userAgent.indexOf("MSIE") > -1 && !OPERA ) {
insertTagIE(obj, stag, etag);
}
else {
insertTagNS(obj, stag, etag);
}
}

function insertTagNS(obj, stag, etag)
{
obj.value = obj.value+stag+etag;
}

function insertTagIE(obj, stag, etag)
{
r=document.selection.createRange();
if( document.selection.type == 'Text' && (obj.value.indexOf(r.text) != -1) ) {
a = r.text;
r.text = stag+r.text+etag;
if ( obj.value.indexOf(document.selection.createRange().text) == -1 ) {
document.selection.createRange().text = a;
}
}
else insertAtCaret(obj, stag+etag);
}

function dialogTag(obj, qst, def, stag, etag)
{
var q;
q = prompt(qst, def);
if ( !q ) return;
stag = stag.replace(/%s/i, q);
insertTag(obj, stag, etag);
}

function url_insert()
{
if ( check_selection() )
dialogTag(document.post_form.msg_body, 'Location:', 'http://', '', '');
else
dialogTag(document.post_form.msg_body, 'Location:', 'http://', '%s', '');
}

function check_selection()
{
var rn;
var sel;

if ( document.layers ) return 0;
if ( navigator.userAgent.indexOf("MSIE") < 0 ) return 0;

r = document.selection.createRange();

if ( r.text.length && (document.post_form.msg_body.value.indexOf(r.text) != -1) ) {
a = document.selection.createRange().text;
rn = Math.random();
r.text = r.text + ' ' + rn;

if ( document.post_form.msg_body.value.indexOf(rn) != -1 ) {
sel = 1;
} else {
sel = 0;
}

document.selection.createRange().text = a;
}

return sel;
}

function storeCaret(textEl)
{
if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}

function insertAtCaret(textEl, text)
{
if (textEl.createTextRange && textEl.caretPos)
{
var caretPos = textEl.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
}
else
textEl.value = textEl.value + text;
}

function email_insert()
{
if ( check_selection() ) {
dialogTag(document.post_form.msg_body, 'Email:', '', '', '');
}
else
dialogTag(document.post_form.msg_body, 'Email:', '', '%s', '');
}

function image_insert()
{
dialogTag(document.post_form.msg_body, 'Image URL:', 'http://', '%s', '');
}

function insertParentTagIE(stag, etag)
{
r=window.opener.document.selection.createRange();
obj = window.opener.document.post_form.msg_body;

if( window.opener.document.selection.type == 'Text' && (obj.value.indexOf(r.text) != -1) ) {
a = r.text;
r.text = stag+r.text+etag;
if ( obj.value.indexOf(window.opener.document.selection.createRange().text) == -1 ) {
window.opener.document.selection.createRange().text = a;
}
}
else insertAtCaret(obj, stag+etag);
}

function insertParentTagNS(stag, etag)
{
window.opener.document.post_form.msg_body.value = window.opener.document.post_form.msg_body.value + stag + etag;
}

function insertParentTag(stag, etag)
{
if ( document.all )
insertParentTagIE(stag, etag);
else
insertParentTagNS(stag, etag);

}

function window_open(url,winName,width,height)
{
xpos = (screen.width-width)/2;
ypos = (screen.height-height)/2;
options = "scrollbars=1,width="+width+",height="+height+",left="+xpos+",top="+ypos+ "position:absolute";
window.open(url,winName,options);
}

function layerVis(layer,on)
{
if (on) {
if (DOM)
document.getElementById(layer).style.visibility = "visible";
else if (NS4)
document.layers[layer].visibility = "show";
else if (IE4)
document.all[layer].style.visibility = "visible";
} else {
if (DOM)
document.getElementById(layer).style.visibility = "hidden";
else if (NS4)
document.layers[layer].visibility = "hide";
else if (IE4)
document.all[layer].style.visibility = "hidden";
}
}
Re: Newbie: speed issue? [message #16552 is a reply to message #16518] Thu, 05 February 2004 16:14 Go to previous messageGo to next message
firepages is currently offline  firepages   Australia
Messages: 24
Registered: July 2003
Karma: 0
Junior Member
thats not the 2.6.0 lib.js rather an earlier version and does not contain the offending code , perhaps you have more than one installation ?
Re: Newbie: speed issue? [message #16554 is a reply to message #16552] Thu, 05 February 2004 16:30 Go to previous messageGo to next message
blueview is currently offline  blueview   United Kingdom
Messages: 12
Registered: February 2004
Karma: 0
Junior Member
oops, yes that's the file from 2.5x i'm currently running. thanks for your help, i'll give 2.6 a try and delete the offending lines.
Re: Newbie: speed issue? [message #16585 is a reply to message #16554] Mon, 09 February 2004 19:02 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I am surprised that people are experiencing slowdowns, my IE6.0 or an rather old celeron 500 does not experience any visible slowdowns loading the page & png images.

FUDforum Core Developer
Re: Newbie: speed issue? [message #16675 is a reply to message #16518] Wed, 11 February 2004 22:24 Go to previous messageGo to next message
Darknean is currently offline  Darknean   Canada
Messages: 1
Registered: February 2004
Karma: 0
Junior Member
I had problem once with javascript where a looping was preventing IE to continue normally. Javascript waits 'til the loop 'for' is done. Maybe in this case it would be more adequat to use setTimeout instead.

EDIT
=====================================================
Ok! I tried some alternatives and here what my png part in lib.js looks like:
Quote:


// This code below is used to make PNG's to work in IE.
// The code comes from youngpup.net. Thanks youngpup!
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);

if (itsAllGood) {
// EDIT: Commented by Sébastien Nadon
// February 11, 2004
//document.writeln('<style type="text/css">img { visibility:hidden; } </style>');
window.attachEvent("onload", fnLoadPngs);
}
}

//==================================================
// EDITED BY Sébastien Nadon
// February 11, 2004
//--------------------------------------------------
// Using 'while' instead of 'for' to better
// avoid the temporary inactivity of IE
//==================================================
function fnLoadPngs()
{
var i = document.images.length;

while( img = document.images[ --i ] )
{
if( img.src.match(/\.png$/i) != null )
{
img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.src + "', sizingMethod='image')";
img.src = "blank.gif";
}
}
}

/* Test with setTimeout
** Error: Object Expected
function fnLoadPngs()
{
fnLoadPngsSmoothly( document.images.length -1 );
}

function fnLoadPngsSmoothly( i )
{
if( img = document.images[ i ] )
{
if( img.src.match(/\.png$/i) != null )
{
var src = img.src;
img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='image')";
img.src = "blank.gif";
}

setTimeout( "fnLoadPngsSmoothly( --i );", 30 );
}
}
*/



I hope Ilia can check this because I'm running out of time Sad

[Updated on: Wed, 11 February 2004 22:58]

Report message to a moderator

icon14.gif  Re: Newbie: speed issue? [message #17668 is a reply to message #16518] Sat, 10 April 2004 11:30 Go to previous messageGo to next message
Peter Verrill is currently offline  Peter Verrill   United Kingdom
Messages: 23
Registered: May 2002
Karma: 0
Junior Member
A little old but anyway:

I was also getting this problem.
My solution was to increase the maximum amount of simultaneous connections allowed to apache from a specific IP.
Re: Newbie: speed issue? [message #17693 is a reply to message #17668] Sat, 10 April 2004 21:25 Go to previous message
mocara is currently offline  mocara   United Kingdom
Messages: 157
Registered: January 2004
Karma: 0
Senior Member

I didn't even realise there was such a setting in Apache!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: NNTP script wasn't updated with 2.6.1
Next Topic: Changelog
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 11:43:17 GMT 2024

Total time taken to generate the page: 0.02679 seconds