Shaun: Possible Performance Increase (Full Version)

All Forums >> [Current Games From Matrix.] >> [Sports] >> PureSim Baseball



Message


Abev -> Shaun: Possible Performance Increase (7/31/2006 7:05:10 PM)

Shaun I came across this while modifying one of my addins. *My* standard discalimers apply: I am not a professional programmer. I could be way off on this one. But looky here:

In my bestplayervalue addin, I grab the recordset from table "Players". There is an option to include max age and players in the majors only. For BOTH test I used max age of 35 and players both in majors and in minors. Both recordsets resulted in 1354 players.

In the code there is a Do until rs.eof...where I calculate values on all players in the rs resulting in the output of my addin.

One test has "moPureSim.helperShowPleaseWaitMessage "Calculating Values for " & rs!FirstName & " " & rs!LastName" INSIDE the Do until, so the name would change each time a movenext occured. Total time to execute 326,609 milliseconds (ticks)

The other test was without "moPureSim.helperShowPleaseWaitMessage "Calculating Values for " & rs!FirstName & " " & rs!LastName" (commented out) so the helper just displayed "Calculating Values" where that message was places before the Do Until. Total time to execute 95,516 milliseconds (ticks)

The thing I dont know is if rs!FirstName and rs!LastName is a trip to the work db, or if it adds no extra time as the rs is there for the taking.

Almost 3 times faster *without* displaying the names. Is this an isolated case? If this is always the case maybe this could really help speed up the almanac creation?




SittingDuck -> RE: Shaun: Possible Performance Increase (7/31/2006 10:10:55 PM)

I understand not a word, I tell you, but appreciate the thinking behind this post.  I hope it generates some good outcome.

Remember Shaun might not get around to this for a few days.




Abev -> RE: Shaun: Possible Performance Increase (7/31/2006 10:40:24 PM)


quote:

ORIGINAL: SittingDuck

I understand not a word, I tell you, but appreciate the thinking behind this post.  I hope it generates some good outcome.

Remember Shaun might not get around to this for a few days.



It wasnt long ago that I didnt understand a word of it either. I thought I would never ever be able to write 2 lines of code without a programming book opened in front of me.




SittingDuck -> RE: Shaun: Possible Performance Increase (7/31/2006 11:25:03 PM)

I believe I should have learned programming years ago, mainly to create my own sim.  Now, I just don't have the patience to learn, but I think if you do, then it is the way to go.




Amaroq -> RE: Shaun: Possible Performance Increase (8/1/2006 12:15:42 AM)

Heh, that's exactly why I learned to program! [:D]




SittingDuck -> RE: Shaun: Possible Performance Increase (8/1/2006 1:51:11 AM)

Where's the game, biotch?  [;)]




WYBaugh -> RE: Shaun: Possible Performance Increase (8/1/2006 6:06:31 AM)

I can try and take a stab:

The RecordSet (rs) is already created and accessible to the program from your query so it's effectively not going back to fetch from the database each time (you're just looping through the recordset).

As you wrote the speed up is due to not showing the text on the screen.  It's a trade off of showing the user that something is actually happening versus speed.  Shaun may want to change it to a progressbar?

Bill




Nukester -> RE: Shaun: Possible Performance Increase (8/1/2006 6:16:32 AM)

Anything that will speed up the offseason would be a godsend




Abev -> RE: Shaun: Possible Performance Increase (8/1/2006 6:18:40 AM)


quote:

ORIGINAL: WBaugh

I can try and take a stab:

The RecordSet (rs) is already created and accessible to the program from your query so it's effectively not going back to fetch from the database each time (you're just looping through the recordset).

As you wrote the speed up is due to not showing the text on the screen.  It's a trade off of showing the user that something is actually happening versus speed.  Shaun may want to change it to a progressbar?

Bill


Good stuff. Maybe shaun you can test one large rs with the names and without the names. Its so little info its amazing it decreases performance that much.




puresimmer -> RE: Shaun: Possible Performance Increase (8/1/2006 6:20:19 AM)

Unfortunately, this stuff is already optimized in core PureSim code.




Abev -> RE: Shaun: Possible Performance Increase (8/1/2006 6:23:50 AM)

Does that mean it cant be changed or even tested?

Either way is it possible that that little bit of data changes the execution time?




puresimmer -> RE: Shaun: Possible Performance Increase (8/1/2006 6:29:12 AM)


I have optimized PureSim for this already. For example, when you create an association and players are being generated, I only update the message every 100 players.

Additionally, you are paying a huge performance tax because your code is communicating with the PureSim user interface through the Addin "layer."

Good jon on your end BTW! Looks like you are making huge progress.




puresimmer -> RE: Shaun: Possible Performance Increase (8/1/2006 6:30:04 AM)

To be clear the perf hit is through the UI update, there is no data access going on in the code you mentioned.




Abev -> RE: Shaun: Possible Performance Increase (8/1/2006 3:46:36 PM)


quote:

ORIGINAL: puresimmer


I have optimized PureSim for this already. For example, when you create an association and players are being generated, I only update the message every 100 players.

Additionally, you are paying a huge performance tax because your code is communicating with the PureSim user interface through the Addin "layer."

Good jon on your end BTW! Looks like you are making huge progress.


Thanks, Shaun.

I was speaking more specifically of the off season html almanac creation. When those pages are created it goes through each one individually. Off season processing takes 20+ mins. Was hoping we could shave a couple mins off here and there.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.75