SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
SI - Site Forums : Silicon Investor - Legacy Interface Discussion (2004-2011)

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: David Lawrence who wrote (34)1/13/2004 4:48:51 PM
From: SI Bob  Read Replies (2) of 6035
 
You're referring to the "Previous" and "Next" links.

I'm going to try it this way first to see how it goes because I think it's a tiny bit more efficient.

iHub makes two extra (albeit small) calls to the database to determine the absolute message number to use for the Previous and Next links. Only one of which will be used.

The way I'm doing it on SI-New ("SIN"?) is to take one (small) database hit at the time the Previous or Next link is clicked. Go.asp does nothing more than determine the absolute message number then redirects the user to readmsg.asp with that number.

By my reckoning I've turned two small db hits (one of which, by definition, is a wasted one) into one hit of about the same size as one of iHub's extra hits.

As for slowness, I'm hoping that was only temporary as you ran into errant code. I'm doing surgery while the patient is awake, so anytime I drop the scalpel, you'll know.

On a side note, I've always wanted to rewrite iHub's readmsg routine from scratch. It was large and complicated when I inherited it, and I've basically just added more stuff to it.

Getting a chance to do so now with SI. Though I don't have everything done yet, SI's readmsg is only 40 lines right now! Compared to 376 lines for iHub's version.

Since this is the most often hit routine on a message board, I'm not pulling any punches in trying to make it as tight and efficient as possible.

Edit: Some (okay, a lot) of the efficiency I'm building into SI's readmsg.asp is coming at the cost of a SQL stored procedure from Hell! It's more than a little likely that I don't have the best indexes in place for that query yet. I'll go through it later when I'm able to make changes with the system under a much heavier load so I can observe the results.

I reserve the right to change db-intensive stuff into asp-intensive stuff later if it looks necessary. SQL Server (at least for iHub) stays way ahead of the webserver, even though the webserver there is more powerful. But the fact of the matter is that it's easier and cheaper to add webserver horsepower than database horsepower in this environment. Especially since I'm writing it to be completely sessionless.
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext