I am working on a solution and I will have a test ready in a day or two, maybe tonight.
Robert.
On Thursday, July 3, 2003, at 11:51 AM, Bill Conlon wrote:
It would be interesting to profile some db servers. My sense is that
there are lots of unused CPU cycles on them because of disk latency. And
DBMSs are threaded, highly optimized systems, so it should be possible to
run some calcs on them w/o any noticeable impact on query performance.
Of course there's a trade-off between portability and system-specific
performance optimization, and everyone has their own set of criteria,
including development effort. It seems to me that DB-specific SQL
dialects would not greatly impact portability. Certainly not compared to
the gross functional differences between DBMSs (transaction support,
referential integrity, supported data types, or 'features' like mySQL
treating the first and subsequent timestamp columns differently).
I don't use stored procedures, because I want my code to be portable. Also, in my case, I don't want to hog my DB CPU running loops or special queries. It serves systems, and its job is to spit out queries as fast as possible. I would rather load my web/app server or clients down, because they are easily scalable.
I am not looking for a short term solution, but a long term one. I also
think something along these lines is necessary for witango to succeed.
The JSP/J2EE model provides this level of performance along with a
scripting language. Witango is much easier, it should provide the same
level of performance or better as JSP/J2EE. Then the selling point is
its ease of use and Rapid development.
I hope that all makes sense. I think alot faster than I can type. ;-)
Robert.
On Thursday, July 3, 2003, at 10:03 AM, Bill Conlon wrote:
This doesn't address Robert's general issue of overall speed
improvement,
but for the specific case of calculating workdays, what about doing a
calculation in the database with a direct DBMS SQL statement.
Case 1. Create a stored procedure that implements your calc, and pass
your date arguments.
Case 2. Provide the calculation and arguments in a SQL query.
I'm just glancing through the operator and function references for a few DBs, and it seems like you could do most of this using existing functions. More to the point, I think you could gain much more from analysis of the problem, than from compiling a brute force solution.
Instead of looping through all the days, you could just determine the
number of days difference, divide by seven to get weeks, multiply by
five
to get workdays, and then adjust plus or minus five based on the day of
the week of the start and end days.
Interesting,
As a matter of fact I use stored procedures in my database for a lot of the big looping of 10s of thousands of records. But that is not portable and doesn't solve the issue of looping speed within Witango.
I see now that dynamics within loops with compiler based languages have come a long way since I last tried.
I just don't want to loose the capability of dynamically creating object references.
There is a plus side, the continual speed increase on processors. When I run it on a Pentium 2 400Mhz server it takes a minute and a half :-)
Ben Johansen - http://www.pcforge.com
Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm
Authorized MDaemon Mail Server Reseller
http://www.pcforge.com/AltN.htm
-----Original Message----- From: Robert Garcia [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 10:16 PM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: Boosting Server Performance, and TCFs
I thought of that, so I made the instantiation a domain scope, then removed it for the subsequent times. I was surprised, it didn't not seem to have any effect. It must have only added a few milliseconds. Either way the TCF method was slightly slower or the same.
I agree that no one is going to look at that many years, but it was a
good example to use as a comparison.
The reason I am so hot on this, is that I have several reports that I
need to write, that require alot of looping and processing, and it
just
chokes the witango server, and I need to right them in RB. I think if
we had the choice quick and easy compiled code, then this would be
less
of a problem.
Robert.
On Wednesday, July 2, 2003, at 02:55 PM, Ben Johansen wrote:
No doubt the instantiation of the object is the add second or 2.second.
If I can find some time I might try server side javascript.
But realistically, I did it for 1 year which is about the max period
someone would do, the TCF version on my 1.6gig P4 Laptop took aI
Start 14:54:31
from 07/02/2003 to 07/02/2004 Total Nbr Days 366 Total Work Days 262
End 14:54:32
Ben Johansen - http://www.pcforge.com
Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm
Authorized MDaemon Mail Server Reseller
http://www.pcforge.com/AltN.htm
-----Original Message----- From: Robert Garcia [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 12:49 PM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: Boosting Server Performance, and TCFs
I have tested your new TAFs. The TAFs that don't call the TCF method,
both run 14 to 15 seconds consistently. The TAF that calls the TCF
takes 15 to 16 seconds consistently.
Does anyone have any updated docs on developing beans for use in Witango?
Robert.
On Wednesday, July 2, 2003, at 12:56 AM, Ben Johansen wrote:
Ok, so you are cleaning my clock :-)
I have changed the calcs into a TCF and also matched your logic.
Robert, Could you run the test against your server with the new "workdates3.taf" which calls "daycalc.tcf"?
This will be a more accurate time run because it is using the seconds
model you used in RB.
also included is the seconds logic in just a taf "workdates2.taf" (no
here:tcf call) could you run this time test on your server
Ben Johansen - http://www.pcforge.com -Authorized WiTango Reseller http://www.pcforge.com/WitangoGoodies.htm -Authorized Alt-N Reseller http://www.pcforge.com/AltN.htm
-----Original Message----- From: Robert Garcia [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 7:03 PM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: Boosting Server Performance, and TCFs
OK, I created an application in RealBasic, and compiled for all platforms. It can be downloaded here:
http://public.bighead.net/workdaytest/
I also set up the workday taf on my test server and it can be runserver
http://poh.bighead.net/workday/
With the default values, spanning 46020 days my witango v5.1.058running on Windows 2000 server, AMD proc. running at 1.5ghz, with 512megs ram, and a 266FSB, it should take 15 seconds. If it takes longer, it is because a couple of you are hitting it at once.
Now If I run my RB app on the same machine, it takes about 1/3 of a
second if I do not give a progress indication, and about a second ifmydo. That is even more of a performance increase than I expected. Onnewmac, the results are about the same, except the progress calc takes
just over 2 seconds.
Also, I am running my calc within its own thread. If I were to not thread the process, and disable background tasks, I could probably squeeze out another 10% performance.
Here is my code from the RB method, you can download the rb project
from the link above:
Sub calcWDays() dim sDate,eDate,iDate as date dim nDays,wDays,sTicks,eTicks as double dim i as integer dim s as string
sTicks = ticks
sDate = new date eDate = new date
sDate.year = sDateDC.year sDate.month = sDateDC.month sDate.day = sDateDC.day
eDate.year = eDateDC.year eDate.month = eDateDC.month eDate.day = eDateDC.day
nDays = (eDate.totalSeconds - sDate.totalSeconds)/86400
wDays = 0
iDate = new date
iDate = sDate
for i = 1 to nDays
s = str(iDate.DayOfWeek)
if iDate.dayofweek > 1 and iDate.dayofweek < 7 then
wDays = wDays + 1
end if
iDate.TotalSeconds = iDate.TotalSeconds + 86400
next
eTicks = ticks
s = "The total number of dates between "+sDate.abbreviatedDate+"
and
"+eDate.abbreviatedDate+" is "+str(nDays)+". "
s = s + "The number of workdays in between is "+str(wDays)+" and
the
time taken to calculate was "+str((eTicks-sTicks)/60)+" seconds."
msgBox s
End Sub
I tried to make the RB method as Identical to the one in Ben's taf as possible as you can see. sDateDC and eDateDC are the date control objects that the user interacts with.
Robert.
On Tuesday, July 1, 2003, at 06:09 PM, Ben Johansen wrote:
Cool and while you at it make the week day taf into a tcf and create awhenalsocustom tag called <@DATEDIFFWK> LOL!.
Ben Johansen - http://www.pcforge.com -Authorized WiTango Reseller http://www.pcforge.com/WitangoGoodies.htm -Authorized Alt-N Reseller http://www.pcforge.com/AltN.htm
-----Original Message----- From: Robert Garcia [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 5:05 PM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: Boosting Server Performance, and TCFs
Actually, you could instantiate one field, then build an array of fields to the nth, building an array of field objects, and then loop through them referencing like so:
for x = 1 to 10000000 field(x) = "some value" next x
I just downloaded your weekday taf, I will do a test with it.
Robert.
On Tuesday, July 1, 2003, at 04:51 PM, Ben Johansen wrote:
Yes, when all factors are know the compiled code is quick.
In your example you have 10 and it looks nice an simple. Now multiply it by 10 and then maintain it. :-P
Take the example I just sent with workdates.taf write a case statement for all possible dates. Aaaaaah.
The number of times that I had a loop that I know all the factors I could probably count on my hands and ok I will take off my shoes;-)is
The nature of a loop is dynamics, placing the case within the loophttp://www.pcforge.com/WitangoGoodies.htmto me not intuitive but is required for a compiler.
I am just going by experience and IMHO I will take dynamics over compiled.
Ben Johansen - http://www.pcforge.com Authorized Witango ResellerAuthorized MDaemon Mail Server Reseller http://www.pcforge.com/AltN.htm
-----Original Message----- From: Robert Garcia [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 4:37 PM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: Boosting Server Performance, and TCFs
There really is no increase in code. I do this all the time in a single
conditional statement like:
for x = 1 to 10
select case x
case 1 field_1 = "some value" case 2 field_2 = "some value" case 3 field_3 = "some value" case 4 field_4 = "some value" case 5 field_5 = "some value" case 6 field_6 = "some value" case 7 field_7 = "some value" case 8 field_8 = "some value" case 9 field_9 = "some value" case 10 field_10 = "some value" next x
There are other ways also, this is the simplest. Another way is to build an array of objects, and loop through them.
I think you underestimate the level of performance gain you getEspeciallyyou compile versus interpret on the fly on complex tasks.Iyouprocessing loops. I will do a test and get back to this with some results.
Robert.
On Tuesday, July 1, 2003, at 02:32 PM, Ben Johansen wrote:
You are correct, and this is where I question the speed boost.
On one hand you have the quicker run speed but on the other handhave the increased amount of code due to lose of this dynamic.
There is no easy conversion of code and mindset between them.
Ben Johansen - http://www.pcforge.com Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm Authorized MDaemon Mail Server Reseller http://www.pcforge.com/AltN.htm
-----Original Message----- From: Robert Garcia [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 2:20 PM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: Boosting Server Performance, and TCFs
dynamic referencing a table is one thing, that should be ok. Whatforwouldmean is referencing an object dynamically like you can do with javascript/flash with the eval() function.
For instance, in javascript/flash, if you have a set of fields, named field_1, and field_2, and so on to field_10, they could be referenced dynamically like so:
for x = 1 to 10 eval("field_"+str(x)) = "some value" next x
The same could be done in witango with a bunch of arguments, <@arg field_1>, and so on.
<@for start=1 stop=10 step=1> <@addrows local$newArray <@arg field_<@currow>>> </@for>
I don't believe this could be done in a compiled language. Youhave to use a select case method or build an array of objects or something.
Robert.
On Tuesday, July 1, 2003, at 01:47 PM, Atrix Wolfe wrote:
you could still do dynamic referencing if they made allowancesorit,that
like if they stored a table w/ the names of the vars and pointers to them.
If you can make java bytecodes though and then use gcc to makeainto an executable or dynamic library, would you really need With to makewitango compiler? That is assuming you dont lose anything like dynamic referencing in either of those 2 steps.
I've been kind of wondering about this since With said you could make
tango into java bytecodes though...if you made your code into java bytecodes, does it support dynamic referencing TCF's, includes etc?
Just wondering if could expect any and all code to work the same whether it was tango or java bytecodes.
----- Original Message ----- From: "Robert Garcia" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 01, 2003 1:25 PM Subject: Re: Witango-Talk: Boosting Server Performance, and TCFs
Just because our tafs would be compiled in some native format, doesn't mean we would have to start worrying about things garbage collection. The compiled tcf would would have in/out points and process data within. It would run within the memory space of the witango server, and the server would handle the garbage collection and the nasty stuff. The main benefit would be that complex methods in a tcf would not be scripted, but compiled so that there would be no tag processing and the other performance drags that are inherant with an interpreted language. It would mean, though, that certain things you can do in a tmllanguagetaf, you could not do, like dynamic referencing.
Robert.
On Tuesday, July 1, 2003, at 09:49 AM, Scott Cadillac wrote:
But it does add several layers of complexity too. I'm not an expert
at this level by any means, but it seams to me that Witango isn't ready
to support this kind of low-level environment (nor any interpreted____________________________________________________________________ __http://theradmac.com/for that matter, e.g., ColdFusion).
For example, garbage collection and other memory allocation issues - what sort of Metatags would we need for this?
--
Robert Garcia President - BigHead Technology CTO - eventpix.com 2781 N Carlmont Pl Simi Valley, Ca 93065 ph: 805.522.8577 - cell: 805.501.1390 [EMAIL PROTECTED] - [EMAIL PROTECTED] http://bighead.net/ - http://eventpix.com/ -___________________________________________________________________ _
___________________________________________________________________ ___ _ __ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
___________________________________________________________________ ___ _ _ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
--
Robert Garcia President - BigHead Technology CTO - eventpix.com 2781 N Carlmont Pl Simi Valley, Ca 93065 ph: 805.522.8577 - cell: 805.501.1390 [EMAIL PROTECTED] - [EMAIL PROTECTED] http://bighead.net/ - http://eventpix.com/ - http://theradmac.com/
___________________________________________________________________ ___ _ _ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
___________________________________________________________________ ___ _ _ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
--
Robert Garcia President - BigHead Technology CTO - eventpix.com 2781 N Carlmont Pl Simi Valley, Ca 93065 ph: 805.522.8577 - cell: 805.501.1390 [EMAIL PROTECTED] - [EMAIL PROTECTED] http://bighead.net/ - http://eventpix.com/ - http://theradmac.com/
___________________________________________________________________ ___ _ _ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
___________________________________________________________________ ___ _ _ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
--
Robert Garcia President - BigHead Technology CTO - eventpix.com 2781 N Carlmont Pl Simi Valley, Ca 93065 ph: 805.522.8577 - cell: 805.501.1390 [EMAIL PROTECTED] - [EMAIL PROTECTED] http://bighead.net/ - http://eventpix.com/ - http://theradmac.com/
____________________________________________________________________ ___ _ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
__ _ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
--
Robert Garcia President - BigHead Technology CTO - eventpix.com 2781 N Carlmont Pl Simi Valley, Ca 93065 ph: 805.522.8577 - cell: 805.501.1390 [EMAIL PROTECTED] - [EMAIL PROTECTED] http://bighead.net/ - http://eventpix.com/ - http://theradmac.com/
_____________________________________________________________________ ___ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
_____________________________________________________________________ ___ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf<WorkDates2.zip>
--
Robert Garcia President - BigHead Technology CTO - eventpix.com 2781 N Carlmont Pl Simi Valley, Ca 93065 ph: 805.522.8577 - cell: 805.501.1390 [EMAIL PROTECTED] - [EMAIL PROTECTED] http://bighead.net/ - http://eventpix.com/ - http://theradmac.com/
_____________________________________________________________________ ___ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
__ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
--
Robert Garcia President - BigHead Technology CTO - eventpix.com 2781 N Carlmont Pl Simi Valley, Ca 93065 ph: 805.522.8577 - cell: 805.501.1390 [EMAIL PROTECTED] - [EMAIL PROTECTED] http://bighead.net/ - http://eventpix.com/ - http://theradmac.com/
____________________________________________________________________ __
__
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
____________________________________________________________________ __
__
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
Bill Conlon
To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306
office: 650.327.2175 fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com
_____________________________________________________________________ __
_
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
--
Robert Garcia President - BigHead Technology CTO - eventpix.com 2781 N Carlmont Pl Simi Valley, Ca 93065 ph: 805.522.8577 - cell: 805.501.1390 [EMAIL PROTECTED] - [EMAIL PROTECTED] http://bighead.net/ - http://eventpix.com/ - http://theradmac.com/
______________________________________________________________________ __
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
Bill Conlon
To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306
office: 650.327.2175 fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com
_______________________________________________________________________ _
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
--
Robert Garcia President - BigHead Technology CTO - eventpix.com 2781 N Carlmont Pl Simi Valley, Ca 93065 ph: 805.522.8577 - cell: 805.501.1390 [EMAIL PROTECTED] - [EMAIL PROTECTED] http://bighead.net/ - http://eventpix.com/ - http://theradmac.com/
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
