BW if you are still about

Results 1 to 4 of 4

Thread: BW if you are still about

  1. #1
    Heaven's martini Guest

    Default BW if you are still about

    BW or The Brit in Aus.<BR><BR>I have a basic question.<BR><BR>I have a popup containing a small form.<BR>I have a simple select query on the page, the query is dumped into an array using getrows, I then build two select lists from the single array (one for ssn and one for name, connected with js).<BR><BR>My question is this. for optimal speed, is it faster to response.write the entire page out so not one html tag is present without a call to response.write ?<BR><BR>and is there a speed differential in a simple query (est. 50 recs returned) to use a proc for the query.<BR><BR>Its not so important but I am curious as to a way to improve my code, now that most of asp isn&#039;t foreign anymore.<BR><BR>Thanks.

  2. #2
    Join Date
    Dec 1969

    Default Nit picking...

    There *is* a point of dimishing returns in building a single string for Response.Write. When you use & to concatenate string pieces, each time you use it you *throw away* the string you just concatenated to.<BR><BR>a = b & c & d & e<BR><BR>is done, by the VBS compiler, as<BR><BR>temp1 = b & c<BR>temp2 = temp1 & d<BR>a = temp2 & e<BR><BR>So temp1 and temp2 are garbage. Now, if they are small (say &#060; 1000 characters?), no big deal. But the bigger your string gets, the more time throwing away garbage takes. And at some point, it takes more time and memory to do & than a separate Response.Write takes. Where&#039;s that point? Dunno. Experiment, if you really care.<BR><BR>My own opinion: CLEAN CLEAR MAINTAINABLE code is *at least* as important as another 10% performance boost. Write good code and don&#039;t sweat the small stuff.<BR><BR>As for Stored Proc vs. SQL: It&#039;s measurable. If you&#039;ll hit it 10,000 times in an hour, I&#039;d definitely go with the SP. 1,000 times an hour? Ehhh...moot. 100 times an hour? Who cares.<BR><BR>

  3. #3
    Heaven's martini Guest

    Default skol

    Thanks BW.<BR><BR>I kinda came up with that conclusion myself earlier today. (I read some article where some "big time" programmer wrote an entire article and the whole thing was done with response.write, i then assumed i was an idiot because i went the route of allowing the asp and the html to blend in a "readable" fashion as you suggest, I seldom mix lots of asp and html, i choose a block method, readability is quite important to me as well.<BR><BR>My sites get low numbers of hits, if i ever hit a 1000 per hour,i would be partying it up. I develop small company apps for the web, generally, 30 concurrent users is good. but I really needed to satisfy the curiousity.<BR><BR>I don&#039;t concatenate large junks of data as i have read the perf hit, but i was curious if all response.write statements could blow away an html and asp mix, my answer is no, if i am not mistaken, in an environment i described.<BR><BR>thanks, I just needed to consult genious, and i believe i did.

  4. #4
    Sir Osis of the Liver Guest

    Default OMG

    On the weekend, and still thinking of work. You deserve a raise, my drunken friend...<BR><BR>Sir Osis of the Liver<BR><BR>&#060;boo&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts