Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 trying to lower the size of pages....
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

e3stone
Average Member

USA
885 Posts

Posted - 05 August 2002 :  23:23:46  Show Profile  Send e3stone an AOL message
For the past week I've been working on my default.asp page trying to speed it up. I've managed to lower my script time down to 0.14 seconds compared to the original 3.24 seconds by re-writing the query that pulls the forums, cats, etc. Using GetRows and getting rid of the ListForumModerators method and replacing it with a GetRows query itself. Now, my question is, if I have all the copyright notices still in place and my file is in final format and WILL NOT be distributed without the 37 lines of ASP comments at the top, would I be allowed to remove that for the sake of file size?

by the way, I'm using v3.3.05...can't wait till 3.4 comes out.

<-- Eric -->

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 05 August 2002 :  23:34:53  Show Profile
You are not supposed to remove that copyright section that is present in each and every .asp file. Do you really think that those 37 lines actually have an effect on the page load time?
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 05 August 2002 :  23:38:53  Show Profile
I think the following lines must remain in every file. It might be okay to remove the others. However, the Forum Admins will be able to tell you if you can.

'#################################################################################
'## Copyright (C) 2000-02 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser

www.forumSquare.com - Rakesh Jain - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 05 August 2002 :  23:53:17  Show Profile  Visit Gremlin's Homepage
quote:

You are not supposed to remove that copyright section that is present in each and every .asp file. Do you really think that those 37 lines actually have an effect on the page load time?


Under earlier ASP versions there were recommendations about removing comments from the code becuase every line of code was passed to ASP.dll and required some time to parse - yes even comments.

Course 37 lines isn't really going to save you anything noticable or perhaps even measurable even under the earliest versions of ASP



www.daoc-halo.com
Go to Top of Page

e3stone
Average Member

USA
885 Posts

Posted - 05 August 2002 :  23:58:46  Show Profile  Send e3stone an AOL message
quote:

You are not supposed to remove that copyright section that is present in each and every .asp file. Do you really think that those 37 lines actually have an effect on the page load time?



Well, I was told just the other day that it wouldn't be a good idea to put a comment section for different sections of code on a page. The reason was the it would put unnecessary load on the server. There was also a discussion about using CSS because all of the <font blah blah> tags and it would lower the page size. Considering that the default.asp page has the comment section (37 lines) and each include on that page (5 of them) has those same 37 lines of code. That's over 200 lines of comments just for the default.asp page.
You're right, it might not be a noticable improvement. Couldn't that notice be an include or something?

<-- Eric -->
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 06 August 2002 :  00:03:19  Show Profile
quote:
Couldn't that notice be an include or something?


Including those lines by way of an INCLUDE statement won't reduce the size of the Page anyway.

www.forumSquare.com - Rakesh Jain - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 06 August 2002 :  00:06:56  Show Profile
Just two throw-away comments :

- 5x37 = 185, which is less than 200

- The Snitz rules state the comments and copyright must remain intact - so if you want to use it (the code), you keep it (comments & copyright) there.

Simple really ...

Go to Top of Page

e3stone
Average Member

USA
885 Posts

Posted - 06 August 2002 :  00:18:00  Show Profile  Send e3stone an AOL message
quote:

Just two throw-away comments :

- 5x37 = 185, which is less than 200

- The Snitz rules state the comments and copyright must remain intact - so if you want to use it (the code), you keep it (comments & copyright) there.

Simple really ...





Actually, the GPL states:
quote:
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.


so, if someone wants to come up with a comment that's 10 lines instead of the 37 (for example) that person would still be complying with the GPL license. I'm not wanting to debate this issue, I was asking a simple question. Weird how no one asked if they could see how I lowered the page load time so much. Guess it won't be as fast as 3.4, though.

<-- Eric -->
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 06 August 2002 :  00:25:38  Show Profile
quote:

Weird how no one asked if they could see how I lowered the page load time so much.


That's because you already told us ...
quote:

by re-writing the query that pulls the forums, cats, etc. Using GetRows and getting rid of the ListForumModerators method and replacing it with a GetRows query itself


Nikkol
~~~~~~~~~~~
Install Guide | MODs
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 06 August 2002 :  00:27:26  Show Profile  Visit dayve's Homepage
quote:

quote:
Couldn't that notice be an include or something?


Including those lines by way of an INCLUDE statement won't reduce the size of the Page anyway.

www.forumSquare.com - Rakesh Jain - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.



the use of INCLUDES in fact can increase time minutely.

http://www.nineinchnailz.com · Snitz Specs · Snitz Mods · Do's and Dont's
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 06 August 2002 :  01:03:06  Show Profile  Visit Nathan's Homepage
Comment lines having an effect on server load??

My goodness, are you really that conserned about clockcycles? The effect should be minimal, I would worry about stuff like removing all those redundant <font /> tags (CSS) before I would consern myself with the comments.

Nathan Bales
Snitz Exchange | Do's and Dont's
Go to Top of Page

e3stone
Average Member

USA
885 Posts

Posted - 06 August 2002 :  02:12:49  Show Profile  Send e3stone an AOL message
I've already removed all the <font> tags and use CSS and removed a good portion of the application variables

so, I'm looking at other things to reduce the page size. That large block of comments (X's 6) seemed to be the most obvious, but I don't want to worry about that anymore.



<-- Eric -->
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 06 August 2002 :  04:04:23  Show Profile  Visit Gremlin's Homepage
Just wondering

What/whys the obsession with page size anyway ?

www.daoc-halo.com
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 06 August 2002 :  04:42:36  Show Profile  Visit HuwR's Homepage
you are more likely to get a better speed increase by caching the image icons which the forum uses, a handful of comment lines in several hundred lines of code is not going to give you any noticeable performance gains.

Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 06 August 2002 :  06:14:36  Show Profile  Visit D3mon's Homepage
If you really want to squash the 'final' code sent from the server to the browser (after all the ASP calculations are done) then have a look at getting rid of all the whitespace in your response.write commands:

response.write " <table>"
response.write " <tr>"
response.write " <td>blah"

..is nice to look at and work with but...

response.write "<table>"
response.write "<tr>"
response.write "<td>blah"

..will result in far less code needed to be sent to the browser on a 56K connection.

You could even go the whole hog and optimize to:

response.write "<table><tr><td>blah"

but it makes working on the code that 'bit' more difficult.

D3mon
'Even if somebody told you the true meaning of life, you wouldn't believe them.'
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 06 August 2002 :  06:25:38  Show Profile  Visit D3mon's Homepage
**** clever forums deleted the whitespace from my examples!

The top example should look like:

response.write "________________<table>"
response.write "__________________<tr>"
response.write "____________________<td>blah"

(imagine the underscores as space/tabs)

D3mon
'Even if somebody told you the true meaning of life, you wouldn't believe them.'
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07