Alteryx Designer Ideas

Share your Designer product ideas - we're listening!

Problem: Custom Images for Macros Multiply File Size

Have you noticed that when you save a custom image to a macro it multiplies the file size? Below I will outline why I believe this happens and how it could potentially be fixed.

 

Hypothesis:

When a image is saved in the XML of a macro, it is saved in a single line of XML code that is generally quite long. I believe the problem this causes is that this very long image code extends the length of all other lines to this new max length. This increased line length seems to increase the file size and is multiplicative based on how many lines of XML that have been extended in the macro. For example, I added a 5KB image to a 7KB macro and saving the macro resulted in a 29KB file size. I have also experienced saving a 5KB image to a 300KB macro that yielded a 1.4MB macro. 

 

In the (very zoomed out) image below, you can see the single line that contains the image information for this simple macro.

 

Macro XML Image.png

 

 

Potential Solution:

Images are saved in the Image tool by splitting the image information into multiple lines. I suggest this same methodology be introduced to custom images loaded to macros. The image below shows the XML of the Image tool that has the same image as the macro stored.

 

Image Tool with Stored Image.png

 

 

I mentioned this in the Solutions Center at Inspire 2016, but I wanted to follow up here to make sure it wasn't lost in the mix. 

7 Comments
Alteryx
Alteryx

I tested your theory but it didn't seem to improve the file size at all.

 

If you send me the image you are trying to set as the macro icon I can try to look into it further and see if there's any optimizations we could make on that code.

Alteryx Certified Partner
Alteryx Certified Partner

Thanks for looking into this, @JPoz.

 

When you added a custom image, you experienced the same multiplicative effect in file size before and after modifying the image string?

 

I've experiences this with a wide variety of image sizes/properties so I don't have a particular example available. 

Alteryx
Alteryx

Yes, although I am not seeing as large of a file size as you are. What sort of file type are you using?

Alteryx Certified Partner
Alteryx Certified Partner

Here's what I just saw in 2018.3 (2019.2 soon, don't worry):

- Create a simple macro (Macro Input, Formula, Macro Output) = 7KB

- Find the old Filter icon included in the Designer install files = 3KB

C:\Program Files\Alteryx\bin\RuntimeData\icons\old\AlteryxBasePluginsGui.Filter.Filter.png

- Set that image as the custom image for the macro. The 7KB macro is now 70KB. 

 

Alteryx
Alteryx

I definitely see the issue you are talking about. I will try to look into this further and see if there is a way we can reduce this file size.

Alteryx Certified Partner
Alteryx Certified Partner

Awesome! Thanks @JPoz !

Alteryx
Alteryx
Status changed to: Not Planned

We looked into this issue. Unfortunately there is not an easy solution, as storing an icon in an XML file requires the additional space as you described above.