Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Shaun: Possible Performance Increase

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Current Games From Matrix.] >> [Sports] >> PureSim Baseball >> Shaun: Possible Performance Increase Page: [1]
Login
Message << Older Topic   Newer Topic >>
Shaun: Possible Performance Increase - 7/31/2006 7:05:10 PM   
Abev

 

Posts: 228
Joined: 8/11/2005
Status: offline
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?
Post #: 1
RE: Shaun: Possible Performance Increase - 7/31/2006 10:10:55 PM   
SittingDuck

 

Posts: 1166
Joined: 9/1/2002
Status: offline
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.

(in reply to Abev)
Post #: 2
RE: Shaun: Possible Performance Increase - 7/31/2006 10:40:24 PM   
Abev

 

Posts: 228
Joined: 8/11/2005
Status: offline

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.

(in reply to SittingDuck)
Post #: 3
RE: Shaun: Possible Performance Increase - 7/31/2006 11:25:03 PM   
SittingDuck

 

Posts: 1166
Joined: 9/1/2002
Status: offline
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.

(in reply to Abev)
Post #: 4
RE: Shaun: Possible Performance Increase - 8/1/2006 12:15:42 AM   
Amaroq

 

Posts: 1100
Joined: 8/3/2005
From: San Diego, California
Status: offline
Heh, that's exactly why I learned to program!

(in reply to SittingDuck)
Post #: 5
RE: Shaun: Possible Performance Increase - 8/1/2006 1:51:11 AM   
SittingDuck

 

Posts: 1166
Joined: 9/1/2002
Status: offline
Where's the game, biotch?  

(in reply to Amaroq)
Post #: 6
RE: Shaun: Possible Performance Increase - 8/1/2006 6:06:31 AM   
WYBaugh

 

Posts: 155
Joined: 7/5/2004
Status: offline
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

(in reply to SittingDuck)
Post #: 7
RE: Shaun: Possible Performance Increase - 8/1/2006 6:16:32 AM   
Nukester


Posts: 472
Joined: 7/3/2006
From: Newburgh, NY
Status: offline
Anything that will speed up the offseason would be a godsend

(in reply to WYBaugh)
Post #: 8
RE: Shaun: Possible Performance Increase - 8/1/2006 6:18:40 AM   
Abev

 

Posts: 228
Joined: 8/11/2005
Status: offline

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.

(in reply to WYBaugh)
Post #: 9
RE: Shaun: Possible Performance Increase - 8/1/2006 6:20:19 AM   
puresimmer

 

Posts: 2299
Joined: 7/24/2005
Status: offline
Unfortunately, this stuff is already optimized in core PureSim code.


_____________________________

Developer, PureSim Baseball

(in reply to Abev)
Post #: 10
RE: Shaun: Possible Performance Increase - 8/1/2006 6:23:50 AM   
Abev

 

Posts: 228
Joined: 8/11/2005
Status: offline
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?

(in reply to puresimmer)
Post #: 11
RE: Shaun: Possible Performance Increase - 8/1/2006 6:29:12 AM   
puresimmer

 

Posts: 2299
Joined: 7/24/2005
Status: offline

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.

_____________________________

Developer, PureSim Baseball

(in reply to Abev)
Post #: 12
RE: Shaun: Possible Performance Increase - 8/1/2006 6:30:04 AM   
puresimmer

 

Posts: 2299
Joined: 7/24/2005
Status: offline
To be clear the perf hit is through the UI update, there is no data access going on in the code you mentioned.

_____________________________

Developer, PureSim Baseball

(in reply to puresimmer)
Post #: 13
RE: Shaun: Possible Performance Increase - 8/1/2006 3:46:36 PM   
Abev

 

Posts: 228
Joined: 8/11/2005
Status: offline

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.

(in reply to puresimmer)
Post #: 14
Page:   [1]
All Forums >> [Current Games From Matrix.] >> [Sports] >> PureSim Baseball >> Shaun: Possible Performance Increase Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

3.469