LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 

Add right-click option to delete class mutation history

Status: New

After fighting an increasingly slow IDE for a while I found the reason editing my libraries and classes was slow: Lengthy and large mutation history.  I'd like to see an easy option to clear that history so I'm not burdened with the edit-time slowness when I don't have to be:

DelMut.png

If I was smart with right-click-frameworky stuff I guess I could make it work myself, but for any so inclined:

DelMutCode.png

9 Comments
MikaelH
Member

I can add this in the GDS framework, but since the class is loaded into memory, I need a way of doing it for the class in memory and then have it to save the lvclass file.

If you can give me info of how to use scripting to do this, you can get a beta version of his feature very soon.

 

JCC_(SK)
Active Participant
I didn't know about Mutation History. Now I know. You don't have to unload it from memory. I found that "If you rename a class, LabVIEW considers it a new class, deletes the mutation history of the class, and resets the version number to 1.0.0.0." See link: http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/using_classes/
JonN
Member

Ran your snippet on the classes in our project and reduced the size of our software updates by 56MB!

_carl
Member

Would like to see this extended to libraries and projects too.

 

It's amazing how big of a difference this makes on large projects.  Fortunately renaming libraries will in essence rename all classes and clear mutation history.  Really would love to see a non-hacky, built-in way of doing this.  (My current process takes about 15 minutes, but it does need to be done every once in a while: back everything up, rename each library in my project, starting with the lowest level dependency, rename it back, move on to the next library).

crossrulz
Knight of NI

There are hidden gems for getting and setting the class mutation history.  It is a lot faster than renaming.

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000015BLnSAM&l=en-US 

 

With that said, I also wish the mutation history could be optional in the class properties.  I have yet to make a class where I care about serialization.  I therefore have never needed the mutation history.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
_carl
Member

There are hidden gems for getting and setting the class mutation history.  It is a lot faster than renaming.

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000015BLnSAM&l=en-US 


And...just found a new way to crash LabVIEW.  Drag-drop that snippet of code onto a 2023 Q1 block diagram...

_carl
Member

Good to know that the tool exists, I may integrate it into some of my work when time permits!  Unfortunately though, it can't be used without putting in some extra leg work.  On large projects you still need to write code to load the project/library, get all classes in it, then run this on each -- with special attention paid to ensuring all classes are already in memory before updating them avoid waiting endlessly for LabVIEW to load each one individually.  That barrier of entry (and the requirement to maintain extra tooling) makes the renaming approach more appealing, especially for code in libraries.

wiebe@CARYA
Knight of NI

We'd also need an option to clear all class mutation histories in a hierarchy, for instance by right clicking the target or a folder.

crossrulz
Knight of NI

I just created an idea for making the class mutation optional: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Make-Class-Mutation-History-Optional/idi-p/4355345 


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5