I've got a package that takes 10-15 seconds to initialize when I include it:
<<my_package`;
Most of that time is spent compiling a collection of few complicated functions. When I learned about Iconize[], I thought it would be a great way to reduce this load time: just compile the functions once, and store the "binaries" in the package file in an iconized format.
The good news: It worked-- my load times went down to less than a second!
The bad news: when I reopen the package file, the iconized content has been expanded, making the ".m" file totally unreadable!
For example, after saving this as a ".m" file ![enter image description here](https://community.wolfram.com//c/portal/getImageAttachment?filename=iconize_before.png&userId=1741916)
when I reopen it, the Iconized data in the assignment (but not the result of the first statement?) is expanded to a big mess: ![enter image description here](https://community.wolfram.com//c/portal/getImageAttachment?filename=iconize_after.png&userId=1741916)
Notebook files (".nb") do not have this issue: iconized data stays iconized when closing/reopening files. Is this a bug, or can anyone help me figure out a workaround?