Jump to content











Photo
- - - - -

System,RebuildVars - Performance Question


  • Please log in to reply
11 replies to this topic

#1 homes32

homes32

    Gold Member

  • .script developer
  • 1030 posts
  • Location:Minnesota
  •  
    United States

Posted 23 January 2012 - 06:11 PM

Hi Peter,

I am using the following code to generate a timestamp that will be used later in the script. I am using IniWrite to save the value in the script so the timestamp is available on future script runs.
I am not using Set with the PERMANENT directive as I don't need the value to be global or accessible by other scripts and perfer that it is stored in the script instead of script.project.

After the IniWrite the new value is not picked up by winbuilder. this is expected as wb has already processed the variables section.

My question is this:
Is there a performance penalty If I use System,RebuildVars? from what I understand from the help docs is that it rebuilds the entire system variable table for the whole project and not just the running script.
is it better for me to use Set,%#1%,%exitcode% (which works good) to redefine %LastUpdate% in order to decrease processing time? or is there a better way to rebuild just the running scripts variables?

thanks.
Homes32


Title=CodeBox test

Description=Running custom commands



[variables]

%LastUpdate%=0

[process]

Run,%ScriptFile%,GetUnixTimeStamp,LastUpdate

Echo,%LastUpdate%



[GetUnixTimeStamp]

ExtractFile,%ScriptFile%,UnixTimeStampNow,UnixTimeStampNow.exe,%GlobalTemplates%%ProgramFolder%

ShellExecuteDelete,Hide,%GlobalTemplates%%ProgramFolder%UnixTimeStampNow.exe

// store for later

IniWrite,%ScriptFile%,variables,#$p#1#$p,%exitcode%

System,RebuildVars

//Set,%#1%,%exitcode%



#2 homes32

homes32

    Gold Member

  • .script developer
  • 1030 posts
  • Location:Minnesota
  •  
    United States

Posted 07 February 2012 - 02:51 PM

gonna bump this one now that Psc is back from vacation. :)

#3 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 07 February 2012 - 06:24 PM

"vacation" would have been nice.

But in reality I have been in a hosptial last weeks and got an operation at my heart. (successfully)
Afte some days at home, I have to leave again for some weeks of recreation.

Please be patient for next weeks.

BTW: you can try to change the dependent variables explicitelly with SET,. But take care on GLOBAL / PERMANENT.

Peter
  • Nuno Brito and TheHive like this

#4 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 07 February 2012 - 07:23 PM

Happy to hear everything went well, Peter.
Have a good time at Reha and come back with new energy and tons of ideas!

:cheers:

#5 homes32

homes32

    Gold Member

  • .script developer
  • 1030 posts
  • Location:Minnesota
  •  
    United States

Posted 07 February 2012 - 07:33 PM

sorry to hear that. glad everything went well and wish you a fast recovery!

#6 RoyM

RoyM

    Frequent Member

  • .script developer
  • 417 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 08 February 2012 - 03:28 AM

Good to hear everything went good.

Get Well Soon Peter, have a good vaca.

RoyM

#7 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10544 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 08 February 2012 - 09:11 AM

Still on recovery but already crunching requests! :1st:

Welcome back my friend, take a good rest and recharge the batteries. :cheers:
  • RoyM likes this

#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14756 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 08 February 2012 - 10:52 AM

Happy to know you are back and still going strong :)

The usual link (only one since you are recovering ;)):
http://idioms.thefre...om/Going+strong

:cheers:
Wonko

#9 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 08 February 2012 - 05:37 PM

Also adding my own best wishes! If you need (or want) anything - let us know!

Scott

#10 TheHive

TheHive

    Platinum Member

  • .script developer
  • 4163 posts

Posted 10 February 2012 - 07:22 AM

"vacation" would have been nice.

But in reality I have been in a hosptial last weeks and got an operation at my heart. (successfully)
Afte some days at home, I have to leave again for some weeks of recreation.

Please be patient for next weeks.

Peter

Glad, to hear you're ok.

#11 TheRookie

TheRookie

    Newbie

  • Advanced user
  • 156 posts
  • Location:in your mind
  • Interests:computers: (repairing, administration), reading: (technological info), outing: (having a good time), music (electronic, house, instrumental...) and hiking
  •  
    South Africa

Posted 10 February 2012 - 10:21 PM

Hello,

@Peter, I'm really sorry to have read about the operation being done on your heart, , it made me feel really sad and at the same time thank the lord for keeping me in the condition I am.

But I feel happy again, knowing that it went well and that you are ok.

Take it easy, relax, my sincere best of wishes, and best of luck to you.

:)

:cheers:

#12 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 11 February 2012 - 12:03 PM


[process]

Run,%ScriptFile%,GetUnixTimeStamp,LastUpdate

Echo,%LastUpdate%

I think, just adding
[process]
Run,%ScriptFile%,GetUnixTimeStamp,LastUpdate
Set,%LastUpdate%,%ExitCode% (Or as you ask, Set,%#1%, ...)
Echo,%LastUpdate%

Will fullfill your requirement.

Peter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users