Platform Builder Forums

Projects => Collaboration => Topic started by: TingThing on October 18, 2020, 07:06:05 PM

Title: Help me optimize the command prompt!
Post by: TingThing on October 18, 2020, 07:06:05 PM
Hi everyone,


I'm working on optimizing the command prompt so that it runs faster in Platform Builder. I think Antikore mentioned some things like removing commands and extra space on compile. That stuff is happening. But there's something else I'm doing too.


The command prompt works by searching through a long list of commands until it finds the one that its looking for. Once it finds the command in the list, it will stop searching and execute the command.


What this means is that I want to have the most commonly used commands to appear early in the list so that they are found quickly.


Could you help me out by commenting below which commands you tend to use most often in Platform Builder? (This also goes for conditionals)


Thanks!
-TingThing
Title: Re: Help me optimize the command prompt!
Post by: Gizgord on October 18, 2020, 09:12:14 PM
here's a list of what I (generally) use the most:
Title: Re: Help me optimize the command prompt!
Post by: CGM on October 18, 2020, 09:29:47 PM
It's hard for me to give such a list since I use such a wide variety of commands.
Title: Re: Help me optimize the command prompt!
Post by: TingThing on October 18, 2020, 10:30:19 PM
It's hard for me to give such a list since I use such a wide variety of commands.


Can you think of the commands or conditionals that you often use in looping command prompts?
Title: Re: Help me optimize the command prompt!
Post by: CGM on October 19, 2020, 01:18:42 AM
@TingThing I haven't used PB in awhile, and I haven't written commands in awhile either. But I do know that when I was using it a lot, I was using random commands, and as for common ones, I used variables a lot, (a whole lot) and other things, but I used so many, it's hard to put it into a list.
Title: Re: Help me optimize the command prompt!
Post by: Antikore on October 19, 2020, 07:33:42 AM
Command Prompt could run lot faster if using switch statements, however, I think that's not possible maybe...
Here is my list:

Title: Re: Help me optimize the command prompt!
Post by: War on October 19, 2020, 01:38:45 PM
which commands you tend to use most often in Platform Builder?
Didn't used PB seriously since Spring 2020, so I can't say. However if you are able to delay this optimization (since it's just build speed after all), you should add a thing to the next version that, if enabled, would check for each export the amount of times each commands is used, and generate a log file that would be sent to you, so you can get information on the most used commands.
Title: Re: Help me optimize the command prompt!
Post by: TingThing on October 19, 2020, 03:01:06 PM
Command Prompt could run lot faster if using switch statements, however, I think that's not possible maybe...



Good thinking, yes, and that's what I already do, and then break the switch once the command has been found. It's also divided up into one switch statement for each letter of the alphabet, dividing up the workload further.


Quote
you should add a thing to the next version that, if enabled, would check for each export the amount of times each commands is used, and generate a log file that would be sent to you, so you can get information on the most used commands.


Also good thinking Warrior. I might do that in the future to polish up the command prompt further.