?
Solved

show CGI?

Posted on 2000-03-09
5
Medium Priority
?
245 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 30 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

752 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