|
On Mon, 15 May 2006 15:27:57 -0400 "Seth Newton" <snewton@xxxxxxxxxxxxxxxxx> wrote: > Brad, > > In a CGIDEV2 application, there is an HTML template that > uses replacement > variables where your dynamic content will go. At runtime, > APIs are used to > search/replace the replacement variables with their > appropriate values. The > difference in performance is quite noticeable, especially > with a subfile > application that loads many records. Actually, it's not as noticable as one one think. (Mel explained how it worked) Even on the poor 170 I ran tests on for plain plain CGI vs. eRPG SDK. Not bad at all. I'd be happy to rerun the numbers. But as far as CGIDEV2 vs. eRPGSDK, I have a link to a graph for this at www.erpgsdk.com. Now, on a new 520 or better, the response times are much better but the graph is pretty much the same shape. But instead of seconds we're at milliseconds, which almost invalidates it anyhow. > With CGIDEV2 and other similar tools, the logic flows > like this: > > 1. Read Template. > 2. Search my template for <%ITEM%> and replace it with > RPG variable ITEM. > 3. Search my template for <%DESC%> and replace it with > RPG variable DESC. > 4. Output template. > > Steps 2 and 3 are CPU-intensive. In a subfile > application, these Search > steps may be repeated thousands of times. Hopefully no one is displaying thousands of lines on a web page, but I See your point. A few milliseconds could add up over thousands of iterations on an old machine (more on that later). > > RPGsp, on the other hand, reads the template at compile > time, and > restructures it to execute like this. > > 1. Output "Item Number:" > 2. Output the value of RPG variable ITEM > 3. Output "<br> Item Description:" > 4. Output the value of RPG variable DESC > > Here, we have no CPU-intensive search/replace logic, > which results in much > faster code. So if the template changes, that means a recompile though, right? Now, I know that a recompile shouldn't be a "big deal", but I know one of the nice things about CGIDEV2 or other packages is that you don't have to recompile, just change the template. Sometimes that feature outweighs the milliseconds one may save. I used to say "who cares if I recompile", but once I found I didn't have to, it was something I almost couldn't live without. But, I would be curious as to some speed tests as well. Theoretically RPGSPs can't be faster than raw CGI unless they use something else in the background. The only reason I ask is, with my tests, on newer machines I haven't seen a noticable difference between CGIDEV2, eRPG SDK or raw RPG-CGI. The bottleneck is the HTTP server (or the QtmhWrStout API) not being able to spit out the data fast enough, and/or the network. AS an example, I ran some tests on eRPG SDK vs CGIDEV2 on a VLP machine from IBM (a 570 partition I think). Well, I couldn't get the execution of either to be more than a second until I went up to 50,000 iterations. Even then while the app took a second to run, it probably took my browser 30 seconds to load the data. Brad
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.