Solved

show CGI?

Posted on 2000-03-09
5
237 Views
Last Modified: 2013-12-25
I have a web page that show all the member information, I use a readxxx.pl to read my xxx.dat and then show it in html. Now i have nearly 100 members and the xxx.dat become larger and larger, (about 50kB), and it tooks a long time to display the web page now, how come?
how to speed up it?
If i store the member information in database, will it be faster?


please help!!!thanks.

mwhuen
0
Comment
Question by:mwhuen
5 Comments
 
LVL 1

Expert Comment

by:chaduka
ID: 2601688
It's only natural to the computer to process a large chunk of data slower than a small bit of data, (unless it's a really weird machine). Well, if your machine is exceptionally fast, you won't notice the difference, but as xxx.dat grows, it will catch up with it.

Using a database for your data is really the way forward. Not only does it save you of unnecessary code but it saves of processing time.

You may also opt to use index files for the data in xxx.dat, but why the heck when databases exist!

Have fun!
0
 

Expert Comment

by:akf
ID: 2608624
Looking at the way you store your data is a good idea, but before you put time into re-implementing that, make sure it's not the size of the web page itself that's the problem. A simple test is to bring up the page, save it to a local file, and open the local file. It the local file isn't much faster than the web page, the problem is probably the HTML.

In particular, Netscape takes a long time to figure out how to display nested tables.
0
 

Author Comment

by:mwhuen
ID: 2608812
My data file is member.dat, it contains:
<record>
Name : xxx
Email : yyy@hotmail.com
....                        #totally about 10 lines for each
....                        # member
</record>
<record>
Name : zzz
Email : xxx@yahoo.com
....
....
</record>

and then repeat for every member.

and then I use a readmember.pl to read the member.dat, and show a table of 6 colums and 100 rows (i have 100 members now).

is this method slow?
0
 
LVL 84

Expert Comment

by:ozo
ID: 2608967
With 1/2 K of data per member, displaying all 100 members may be slow with any method.
0
 
LVL 1

Accepted Solution

by:
chaduka earned 10 total points
ID: 2609082
Yep, but the overhead maybe minimized if you use a database, (RDBMS). Especially as the records increase. There are compareable differences when you have equal records in a flat file and in a database and try to query/process each of them. The database will tend to yield better performances. ....and better still, you won't be required to write chunks of code to do what SQL can easily do in a few lines.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now