Solved

show CGI?

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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

733 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