Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > getstring really slow

Reply
Thread Tools

getstring really slow

 
 
Seán Meehan
Guest
Posts: n/a
 
      07-16-2003
Hi,

Hope somebody can help because i've looked everywhere else fo ran answer.
I'm connecting to an Access table with 100+ rows of data of approx 20
columns wide. I'm using getstring to "Quickly" display it in a table, but
it's un-useably slow. Any suggestions?

Thanks

Seán


 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      07-16-2003
Code? How many people are accessing the site? Are you destroying your
objects? Does the server have a 66MHz PI?

Ray at work

"Seán Meehan" <(E-Mail Removed)> wrote in message
news:T5fRa.1788$(E-Mail Removed)...
> Hi,
>
> Hope somebody can help because i've looked everywhere else fo ran answer.
> I'm connecting to an Access table with 100+ rows of data of approx 20
> columns wide. I'm using getstring to "Quickly" display it in a table, but
> it's un-useably slow. Any suggestions?
>
> Thanks
>
> Seán
>
>



 
Reply With Quote
 
 
 
 
Chris Hohmann
Guest
Posts: n/a
 
      07-16-2003
"Seán Meehan" <(E-Mail Removed)> wrote in message
news:T5fRa.1788$(E-Mail Removed)...
> Hi,
>
> Hope somebody can help because i've looked everywhere else fo ran

answer.
> I'm connecting to an Access table with 100+ rows of data of approx 20
> columns wide. I'm using getstring to "Quickly" display it in a table,

but
> it's un-useably slow. Any suggestions?
>
> Thanks
>
> Seán
>
>

Here's an excellent article on using GetString, GetRows and recordset
iteration. <g>

http://www.aspfaq.com/show.asp?id=2467

Specifically, check out the Analysis:GetStringros section that
discusses the use of the NumRows parameter to output a "burst" of rows.

HTH
-Chris


 
Reply With Quote
 
Seán Meehan
Guest
Posts: n/a
 
      07-16-2003
Ray,

I'm the only one using it at the moment for testing. It's sitting on a
dual pII 200 machine running NT4 Server. It only seems to be when I'm
trying to put the data into a table format. I've tried reading the
recordset into an array using getrows, closing the recordset and
connection and then building the table and there was no speed
difference, Yet if I just response.write straight to the screen it
displays in seconds. This rules out the database side slowing it down,
wouldn't you agree? Any help would be appreciated as it's driving me
mad.

Thanks Again,

Seán

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Seán Meehan
Guest
Posts: n/a
 
      07-16-2003

"Chris Hohmann" <hohmannATyahooDOTcom> wrote in message
news:%23%(E-Mail Removed)...
> "Seán Meehan" <(E-Mail Removed)> wrote in message
> news:T5fRa.1788$(E-Mail Removed)...
> > Hi,
> >
> > Hope somebody can help because i've looked everywhere else fo ran

> answer.
> > I'm connecting to an Access table with 100+ rows of data of approx 20
> > columns wide. I'm using getstring to "Quickly" display it in a table,

> but
> > it's un-useably slow. Any suggestions?
> >
> > Thanks
> >
> > Seán
> >
> >

> Here's an excellent article on using GetString, GetRows and recordset
> iteration. <g>
>
> http://www.aspfaq.com/show.asp?id=2467
>
> Specifically, check out the Analysis:GetStringros section that
> discusses the use of the NumRows parameter to output a "burst" of rows.
>
> HTH
> -Chris
>
>

Excellent article Chris, although I wouldn't have thought 100 or so records
was a large amount of data to read in? I'm just doing a "Select * from
table" at the moment and I'm going to try defining the columns instead and
see whether that helps. If I ever solve this one I'll get back to you.

Regards,

Seán


 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      07-16-2003
Post the relevant code snippet. One way to speed things up would be to not
do a select *. Instead, do a select [something],[somethingelse],etc. But,
I doubt that's what is causing your slowness issue.

Ray at work

"Seán Meehan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Ray,
>
> I'm the only one using it at the moment for testing. It's sitting on a
> dual pII 200 machine running NT4 Server. It only seems to be when I'm
> trying to put the data into a table format. I've tried reading the
> recordset into an array using getrows, closing the recordset and
> connection and then building the table and there was no speed
> difference, Yet if I just response.write straight to the screen it
> displays in seconds. This rules out the database side slowing it down,
> wouldn't you agree? Any help would be appreciated as it's driving me
> mad.
>
> Thanks Again,
>
> Seán
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
Chris Hohmann
Guest
Posts: n/a
 
      07-16-2003
"Seán Meehan" <(E-Mail Removed)> wrote in message
news:cygRa.2980$(E-Mail Removed)...
>
> "Chris Hohmann" <hohmannATyahooDOTcom> wrote in message
> news:%23%(E-Mail Removed)...
> > "Seán Meehan" <(E-Mail Removed)> wrote in message
> > news:T5fRa.1788$(E-Mail Removed)...
> > > Hi,
> > >
> > > Hope somebody can help because i've looked everywhere else fo ran

> > answer.
> > > I'm connecting to an Access table with 100+ rows of data of approx

20
> > > columns wide. I'm using getstring to "Quickly" display it in a

table,
> > but
> > > it's un-useably slow. Any suggestions?
> > >
> > > Thanks
> > >
> > > Seán
> > >
> > >

> > Here's an excellent article on using GetString, GetRows and

recordset
> > iteration. <g>
> >
> > http://www.aspfaq.com/show.asp?id=2467
> >
> > Specifically, check out the Analysis:GetStringros section that
> > discusses the use of the NumRows parameter to output a "burst" of

rows.
> >
> > HTH
> > -Chris
> >
> >

> Excellent article Chris, although I wouldn't have thought 100 or so

records
> was a large amount of data to read in? I'm just doing a "Select * from
> table" at the moment and I'm going to try defining the columns instead

and
> see whether that helps. If I ever solve this one I'll get back to you.
>
> Regards,
>
> Seán
>
>

Can you post some code? What's your content to formatting ratio? What I
mean is:

<style type="text/css">
td{
[[Your style definition for the td tag here]]
}
</style>
....
<td>blah blah blah</td>
<td>blah blah blah</td>
<td>blah blah blah</td>
....

Is better than:

....
<td [[A whole bunch of inline style stuff]]>blah blah blah</td>
<td [[A whole bunch of inline style stuff]]>blah blah blah</td>
<td [[A whole bunch of inline style stuff]]>blah blah blah</td>
....

HTH
-Chris





 
Reply With Quote
 
Chris Barber
Guest
Posts: n/a
 
      07-16-2003
Check out HTML table optimization / optimisation eg.:

http://www.websiteoptimization.com/speed/4/

Chris.

"Seán Meehan" <(E-Mail Removed)> wrote in message
news:T5fRa.1788$(E-Mail Removed)...
> Hi,
>
> Hope somebody can help because i've looked everywhere else fo ran answer.
> I'm connecting to an Access table with 100+ rows of data of approx 20
> columns wide. I'm using getstring to "Quickly" display it in a table, but
> it's un-useably slow. Any suggestions?
>
> Thanks
>
> Seán
>
>



 
Reply With Quote
 
Shailesh Humbad
Guest
Posts: n/a
 
      07-16-2003
Try using GetRows and retrieving 1 to 10 records at a time like this:

' Prepare a SQL query string
strsql = "SELECT Field1,Field2,Field3,Field4 FROM tblData"

' Execute the SQL query and set the implicitly created recordset
Set objRS = objCN.Execute(strsql)

' Write out the results using GetRows in a loop
Response.write "<pre>"
Do While Not objRS.EOF
RecordsArray = objRS.GetRows(10)

' Print out the array
For i = 0 To UBound(RecordsArray, 2)
Response.write RecordsArray(0, i)
Response.write vbTab
Response.write RecordsArray(1, i)
Response.write vbTab
Response.write RecordsArray(2, i)
Response.write vbTab
Response.write RecordsArray(3, i)
Response.write vbTab
Response.write vbCrLf
Next
Loop
Response.write "</pre>"

Seán Meehan wrote:
> Hi,
>
> Hope somebody can help because i've looked everywhere else fo ran answer.
> I'm connecting to an Access table with 100+ rows of data of approx 20
> columns wide. I'm using getstring to "Quickly" display it in a table, but
> it's un-useably slow. Any suggestions?
>
> Thanks
>
> Seán
>
>


 
Reply With Quote
 
Tom B
Guest
Posts: n/a
 
      07-17-2003
I believe the 200MHz processors were Pentium Pro's, as if it matters.

With most browsers, the entire table has to be downloaded and sized before
it can be displayed.
Your table is approximately 20 columns by 100 rows, you can speed up the
table by specifying the widths of your columns.
Another trick is to flush out part of the table. For example:

Do While not RS.EOF
iCount=iCount+1
Response.write "<tr><td>" 'etc.
if (iCount mod 10 =0) then
Response.write "</table><table>"
Response.flush
end if
RS.MoveNext
Loop

However, it's even more important to ensure that you specify column widths,
as your columns may not line up correctly.


"Seán Meehan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Ray,
>
> I'm the only one using it at the moment for testing. It's sitting on a
> dual pII 200 machine running NT4 Server. It only seems to be when I'm
> trying to put the data into a table format. I've tried reading the
> recordset into an array using getrows, closing the recordset and
> connection and then building the table and there was no speed
> difference, Yet if I just response.write straight to the screen it
> displays in seconds. This rules out the database side slowing it down,
> wouldn't you agree? Any help would be appreciated as it's driving me
> mad.
>
> Thanks Again,
>
> Seán
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
String#chop slow? REALLY slow? Mat Schaffer Ruby 11 07-27-2006 05:45 PM
Really slow, painfullu slow asp.net web app michael@randallk.com ASP .Net 3 02-15-2006 11:02 PM
encoder.GetString() help iMonkey ASP .Net 0 07-31-2003 01:37 PM
datareader.getstring(0) error Nakhi ASP .Net 3 07-15-2003 06:41 AM
can't getstring & display datareader Nakhi ASP .Net 0 07-15-2003 06:39 AM



Advertisments