General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 27th, 2002, 03:24 AM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 82 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 57 sec
Reputation Power: 7
Slow download

Hi,

what are the key elements which might cause our script to download slow.

thanks
__________________
Rathaur
======================
Knowledge is Power

Reply With Quote
  #2  
Old December 27th, 2002, 10:43 AM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
What's the code you're using? Also, are you storing the files in a database or are they in a directory? Is the download slow for all users?
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #3  
Old December 27th, 2002, 11:36 AM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 82 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 57 sec
Reputation Power: 7
Hi, Generally the system is written with PHP and mysql as its DB.
I really cant determine the 'slowness' of this system, but I did tried to reduced queries as much as I can.

Generally , what are the things which will make slow downloading of a website ( apart from low bandwidth, bad connections , and a
stone aged PC )

Reply With Quote
  #4  
Old December 27th, 2002, 11:40 AM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Quote:
Originally posted by rathaur
Hi, Generally the system is written with PHP and mysql as its DB.
I really cant determine the 'slowness' of this system, but I did tried to reduced queries as much as I can.

Generally , what are the things which will make slow downloading of a website ( apart from low bandwidth, bad connections , and a
stone aged PC )


Hehehe... if those are the "specs" you're testing on... Then that's the problem!

Seriously though... How are the files stored on the system? Are they stored in the db as BLOBs or are they stored in a directory?

Would you mind posting the code you're using?

Reply With Quote
  #5  
Old December 29th, 2002, 03:40 AM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 82 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 57 sec
Reputation Power: 7
include("../lib/lib.inc");
if (! $opt) $opt =1;
$trn="<img src='../images/turun.jpg' alt='Sort Desc by title'>";
$trn1="<img src='../images/turun.jpg' alt='Sort Desc by name'>";
$trn2="<img src='../images/turun.jpg' alt='Sort Desc by Position'>";
$trn3="<img src='../images/turun.jpg' alt='Sort Desc by Department'>";

$link1="<a href='vwstaff.php?opt=2'>"; // desc by title
$link2="<a href='vwstaff.php?opt=3'>"; // desc by fname
$link3="<a href='vwstaff.php?opt=4'>"; // desc by jawatan
$link4="<a href='vwstaff.php?opt=5'>"; // desc by jabatan

//adminnav();
echo "<center><table width='100%' bgcolor='#000080' border=0>";
echo "<tr width='100%'><td align='center'>";
echo "<font face='verdana,arial,helvetica' color='#ffffff' size='3'>";
echo "Senarai </font></td></tr></table>";

$font="<font face='verdana,arial,helvetica' color='#636563' size='1'><b>";

$tabhead1.="<table width=100% bgcolor='brown' cellspacing=0 border=0>";
$tabhead1.="<tr bgcolor='#dodceo' width=100% heigth=10><td width='5%' align='left'> $font NO. </b></font>";
$tabhead1.="<td width='25%' align='left'>$font $link1 $trn </a> $link2 $trn1 </a> Nama Staff </b></font></td>";
$tabhead1.="<td width='15%' align='left'>$font $link3 $trn2 </a> Jawatan </b></font></td>";
$tabhead1.="<td width='15%' align='left'>$font $link4 $trn3</a> Bahagian </a> </b></font></td>";
$tabhead1.="<td width='10%' align='left'>$font Tel </b></font></td>";

$tabhead1.="</tr>";
// Page Counter
$rows_per_page = $perpage;
$sql = "SELECT * FROM staff ";
$result = mysql_query($sql)or die("DB Fatal Error 1: ".mysql_error());
$total_records = mysql_num_rows($result);
$pages = ceil($total_records / $rows_per_page);

if (!isset($screen)) $screen = 0;
$start = $screen * $rows_per_page;
$dis=$screen+1;
$j=$start+1;
switch ($opt)
{
case 1:
//list the staff by db entry
$sql = "SELECT * FROM staff ";
$sql .= "LIMIT $start, $rows_per_page";
break;
case 2: // sort desc by title
$sql = "SELECT * FROM staff ORDER BY Title DESC ";
$sql .= "LIMIT $start, $rows_per_page";
break;
case 3: // sort desc by first name
$sql = "SELECT * FROM staff ORDER BY Fname DESC ";
$sql .= "LIMIT $start, $rows_per_page";
break;
case 4: // sort desc by first name
$sql = "SELECT * FROM staff ORDER BY Jawatan DESC ";
$sql .= "LIMIT $start, $rows_per_page";
break;

case 5: // sort desc by first name
$sql = "SELECT * FROM staff ORDER BY Bagian DESC ";
$sql .= "LIMIT $start, $rows_per_page";
break;
default:
echo"<h2> Please choose your option</h2>";
break;
} // end of switch

echo " <br><br> <font face='verdana,arial,helvetica' color='#636563'>";
echo "Paparan $dis dari $pages halaman <br></font>";
// print the rable header
echo"<br><br>$tabhead1";
$result = mysql_query($sql);
$rows = mysql_num_rows($result)or die(" DB fatal error :".mysql_error());
//if (!isset($j)) $j=1;
while($row = mysql_fetch_array($result))
{
;
$bgcolor = "#ffffff";
$id=$row['id'];
$tit=$row['Title'];
$fname=$row['Fname'];
$sname=$row['Sname'];
$stfid=$row['staffNo'];
$post=$row['Jawatan'];
$dep=$row['Bagian'];
$tel=$row[' Tel'];
$font="<font face='verdana,arial,helvetica' color='#636563' size='1.5'><b>";

if ($tel == '') $tel='-';
echo"<tr width=100% bgcolor=$bgcolor height=20>";
echo"<td width=5% align='left'>$font $j </font></b></td>";
echo"<td width=25% align='left'>$font $tit $fname $sname </font></b></td>";
echo"<td width=15% align='left'>$font $post </font></b></td>";
echo"<td width=15% align='left'>$font $dep </font></b></td>";
echo"<td width='10%' align='left'>$font $tel </b></font></td>";

echo"</tr><tr bgcolor='#f5f5f5'></tr>";
$j++;
}
echo"</table><br><br>";

// Pages

if ($screen > 0) {
$sc= $screen - 1;
$url = "vwstaff.php?screen=$sc&j=$j&opt=$opt";
echo "<a href=\"$url\">Previous</a>\n";
}
// page numbering links now
for ($i = 0; $i < $pages; $i++) {
$url = "vwstaff.php?screen=$i&j=$j&opt=$opt";
echo " | <a href=\"$url\">$i</a> | ";
}
if ($screen < $pages -1) {
//$url = "student.php?screen=" . $screen + 1;
$scr= $screen + 1;
$url = "vwstaff.php?screen=$scr&j=$j&opt=$opt";
echo "<a href=\"$url\">Next</a>\n";
}

footer();
?>

Reply With Quote
  #6  
Old January 2nd, 2003, 01:08 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Rathaur,

Are your files being stored in the database as a BLOB or in a directory?

Reply With Quote
  #7  
Old January 2nd, 2003, 11:22 PM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 82 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 57 sec
Reputation Power: 7
its located in directory and the script simply calls upon database, and display the content of the tables in html

Reply With Quote
  #8  
Old January 5th, 2003, 05:25 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Rathaur,

Do you have a link where I can test this? I'm curious to see how slow the download is for me... Let me know.

Reply With Quote
  #9  
Old January 5th, 2003, 11:14 PM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 82 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 57 sec
Reputation Power: 7
here you go, hope to hear some good comments from you.

http://ralnetcom.com/mrsm

Reply With Quote
  #10  
Old January 6th, 2003, 07:52 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
What section of the site are you experiencing the slow downloads? I don't understand the language, so I'm having a hard time finding the downloads area!

Thanks!

Reply With Quote
  #11  
Old January 6th, 2003, 09:59 PM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 82 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 57 sec
Reputation Power: 7
Click on 'Staff' link on the left navigation menu. Any comments on the design ?

Reply With Quote
  #12  
Old January 12th, 2003, 03:21 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Rathaur,

I've checked out the site... And I don't see any major speed issues... When you say "downloading", do you mean the actual page loading, or is there a file I should be downloading? I don't see any download links, so I'm assuming you mean the page load.

Another thing I would look at is the host itself... If you're on a shared host, you may want to look at that...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Slow download


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |