01-10-2023 02:00 PM
@BertMcMahan wrote:
There's a chance you could have some large classes due to LabVIEW storing a class's mutation history. Clearing that can significantly reduce sizes:
https://lavag.org/topic/14548-class-mutation-history/
Good idea, I'd forgotten about that one.
Note that the two linked threads are rather old and don't mention the fact that LabVIEW includes tools to manage mutation history programmatically instead of forcing the issue via renaming the class or manually trimming the XML. Specifically these VIs:
vi.lib\Utility\EditLVLibs\LVClass\Get Mutation History.vi
vi.lib\Utility\EditLVLibs\LVClass\Set Mutation History.vi
You can use the first one to see just how much space the mutation history is taking (the biggest offender is usually the Variant containing the default data values). The second one can be used to delete all but the last entry, which is the only one you ought to need in most cases.
The only reason not to do this is if you work under one of these somewhat odd cases:
The first one you have to do extremely deliberately, and the second one is more often done by accident and is also not generally recommended.
01-26-2023 08:10 AM
Thank you for the information! it is really helpful
I have tried deleting the class mutation but it doesn't help much.
01-26-2023 09:06 AM
@Kyle97330 wrote:Note that the two linked threads are rather old and don't mention the fact that LabVIEW includes tools to manage mutation history programmatically instead of forcing the issue via renaming the class or manually trimming the XML. Specifically these VIs:
vi.lib\Utility\EditLVLibs\LVClass\Get Mutation History.vi
vi.lib\Utility\EditLVLibs\LVClass\Set Mutation History.vi
You can use the first one to see just how much space the mutation history is taking (the biggest offender is usually the Variant containing the default data values). The second one can be used to delete all but the last entry, which is the only one you ought to need in most cases.
For a good example of using those two VIs, see here: Slow Editor Performance with Large LabVIEW Projects Containing Many Classes. I turned the snippet into a VI that I keep around my user.lib. And this just reminded me that it has been a decently long time since I cleared the mutation history of my core libraries. Now might be a good time to look at that...