Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Why does deleted branches consume storage?

øyvind_kaurstadøyvind_kaurstad Member Posts: 234 ✭✭✭
I've just recently started using branching in Onshape, and quite often I decide to delete a branch that didn't lead where I wanted to.

Now, when you delete a branch you get a warning that this cannot be undone, which is perfectly fine. However, I would then also expect that the additional space consumed by that branch should be freed again, and that the document size would shrink. This seems not to be the case.

I did the following experiment: Created a new document, and immediately created a branch from the start version (the one automatically created). In this branch I imported a couple of meshes (STL files), just to occupy some space. After doing this, the document had a size of 4 MB, all of which was really in that branch. Then I deleted the branch, but the document still occupies the same space.

Since the branch deletion cannot be undone, why does it still occupy space? This looks almost like a classic memory leak in a computer program, although it is not the same thing.


Comments

  • brian_bradybrian_brady Member, Developers Posts: 505 EDU
    I am assuming you emptied the trash after deleting. I am not sure if that will change what size OS states a document is in the document list, but it will affect overall spaced used for your plan.
  • øyvind_kaurstadøyvind_kaurstad Member Posts: 234 ✭✭✭
    I did not delete the document, just a branch within a document. Emptying trash is for deleted documents, so not relevant in this scenario.
  • lanalana Onshape Employees Posts: 706
    The space occupied by data of that branch gets "garbage collected" with some delay. Two days, If I'm not mistaken.
  • øyvind_kaurstadøyvind_kaurstad Member Posts: 234 ✭✭✭
    Aha, thanks. It would have been better if it was garbage collected immediately, or that users could trigger garbage collection (for their own documents) themselves. Users on the Free plan has very little (private) storage, and might not want to wait two days to regain the space.
  • øyvind_kaurstadøyvind_kaurstad Member Posts: 234 ✭✭✭
    I created a dummy document to test this, and it has been 4 days since I deleted the branch which had data, but the document size still shows the space consumed while the branch existed. In other words, deleted branches does not seem to be garbage collected, at least not in a reasonable time. This needs to be fixed, please.
  • lanalana Onshape Employees Posts: 706
    øyvind_kaurstad  Could you please publish a link to the document here ? I don't need to be able to open - just the document id so that I could check what happened to it in GC. Thank you.
  • øyvind_kaurstadøyvind_kaurstad Member Posts: 234 ✭✭✭
    Here you go:
    https://cad.onshape.com/documents/c24fad1e5c20c4e9bf27058f/w/c640963ff2d2cba9636a5f3f/e/f9fdac29b5f7bbf3e65ff732

    It is a private document, but there really is nothing in it (because I deleted the branch that had data), so I can share it with you if you want.

  • lanalana Onshape Employees Posts: 706
    Thank you. I see this document going through GC on Oct 3rd, but not much was cleaned up. Could you please file an issue via feedback mechanism and share the document with support? Please comment on the issue that it is for Lana's attention so that it finds me quickly. Thank you for raising the issue.
  • øyvind_kaurstadøyvind_kaurstad Member Posts: 234 ✭✭✭
    Done. And while you're at it, please consider if GC could be improved by manual triggering or at least being performed more often. For users on the Free plan this would be useful.
  • lanalana Onshape Employees Posts: 706
    Thank you again for your help in this investigation. The workspace which got cleaned up referenced imported data. That foreign data is stored separately and was not garbage collected. It is a limitation of our current GC algorithm. We'll have to make some improvements. Currently, if you delete this document (move to trash and empty trash) the size of that foreign data will not count against your total. Thank you for the suggestions on how we can improve user experience in this area.
  • øyvind_kaurstadøyvind_kaurstad Member Posts: 234 ✭✭✭
    Thanks for checking it. And since foreign data in many cases take up a lot of space (meshes, for instance) this clearly needs to be fixed. In this case it was just a dummy document, so I will delete it, but as I also like using (and deleting) branches, then deleting the full doc is not a solution, obviously.
Sign In or Register to comment.