Solved

show CGI?

Posted on 2000-03-09
5
239 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
The viewer will learn how to count occurrences of each item in an array.
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…

920 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

12 Experts available now in Live!

Get 1:1 Help Now