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
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
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.
This topic is 2 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
Viterra_
Posts: 1
Last visit: Fri Oct 06, 2023 4:05 am

Executable size keeps growing

Post by Viterra_ »

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
brittneyr
Site Admin
Posts: 1649
Last visit: Mon Mar 18, 2024 1:47 pm
Answers: 38
Been upvoted: 30 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
SPS_ToolBox-Select.png (30.23 KiB) Viewed 4614 times
SPS_PropertiesPane-DropDown.png
SPS_PropertiesPane-DropDown.png (37.58 KiB) Viewed 4614 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
SPS_OptionsRecoveryData.png (25.29 KiB) Viewed 4614 times
Brittney
SAPIEN Technologies, Inc.
This topic is 2 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.