Executable size keeps growing

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Posts: 1
Last visit: Wed May 12, 2021 7:35 am

Executable size keeps growing

Post by glencore »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 2021 version 5.8.187
Operating system: Windows 1-
PowerShell version(s): all

*** Please add details and screenshots as needed below. ***

I've made some small modifications to our PowerShell Studio project and the size of the compiled executable has more than doubled.
I notice that the "File Recovery Data" section in the PS1 file takes up half the size. Is there a way to reduce the size?
The project concists of a form and about 2000 lines of code, but compiled is 9445 KB in size.
This is twice the size it was a few minor releases ago, but after making some minor changes, it went up again to about 14000KB

Please tell me how to avoid this behaviour and get back to a more reasonable size.

User avatar
Site Admin
Posts: 797
Last visit: Mon Jun 21, 2021 11:50 am
Answers: 15
Been upvoted: 11 times

Re: Executable size keeps growing

Post by brittneyr »

There are a couple different factors that can attribute to this such as the complexity of the form and the script engine you are using to package.

Verify that you are not creating any form objects that you are not using. You can view all your controls from the Select tab of the Toolbox pane or from the Properties pane drop-down menu:
SPS_ToolBox-Select.png (30.23 KiB) Viewed 3507 times
SPS_PropertiesPane-DropDown.png (37.58 KiB) Viewed 3507 times
You can also export (Deploy->Export) your form and check the generated form code (not the File Recovery Data).

The File Recovery Data can be removed from an exported PS1 file, but this will prevent recovering the psf file if the file is lost. This can be done here from Options->Designer->Export:
SPS_OptionsRecoveryData.png (25.29 KiB) Viewed 3507 times
Brittney Ryn
SAPIEN Technologies, Inc.