Yeah, you read the title right. Not exactly an interesting topic in the Codea forum, you might say. But, I have just finished cleaning up my Codea installation after reading @dave1707 ‘s discovery of the memory drain that appears to be a feature of the latest (possibly there some time) beta release. I had noted that my installation had been running very slowly, after my cleanup the speed was restored. So, with the Codea system, how do you clean up you installation without loss of any work?

I exported all of the projects I had present in my Codea ‘desktop’/main page, which took me some time exporting to an external storage - so they can be restored fairly easily. I also moved all of my many accumulated assets to an external drive - no problem just time consuming, easy as I had the assets in project.asset folders (collections in Codea).
Then I sat back and considered how to save the many (hundreds) of .Codea files I had in collections - as an aside I named all the collection folders as ‘project.collection’ but the disabled the export option on the menu. Naming the collection as ‘project’ re-enabled the export function but that would have taken me days to complete. So I opted for moving all .codea projects into the Codea root and using @dave1707’s backup utility to capture the code. Then deleting the Codea projects within the Codea root. Still took me ages but ended up with less files and much faster.

However I have a problem - how do I export my shader files? Do I need to copy them from the asset browser by select/copy and then paste them into a text editor?

@Simeon @John - how is the filing system in 4 set up - does it allow external file storage and loading thus retaining minimum local storage? And are the files visible/editable from external editors?

@dave1707 - one question for you - how did you uninstall Codea? Was it by TestFlight or by iOS?

During the cleaning process my iPad was recording 126.8 MB installation with over 2 GB of data storage, dropping to a low of 1.95 GB after cleaning confirming your observation.

@Bri_G I deleted Codea from the iPad Storage page. I was there to see what the final size for Documents and Data was. There’s a Delete App button and then I reinstalled from TestFlight.

PS. Looking at iPad storage, my Codea app size is 128.8MB and the Documents and Data is 13.8MB. I don’t think that 13.8 is correct, so I don’t know what’s going on with iOS.

@dave1707 - thanks for the feedback. Thought that would be the case as I wasn’t sure if TestFlight would purge the memory.

Did you transfer any shader files. I tried one file
‘plain.shader’ which produced a folder on my external drive with nothing inside.

@Bri_G The only thing I transferred was my project files that got saved with my backup program. I don’t have any shader stuff except what’s directly coded inside my projects. I don’t mess around with any external stuff because it’s too much trouble keeping track of them whenever I delete/restore Codea. I’m not sure what would happen if Codea’s zip backup was used. Would that clean up storage or just save/restore everything, junk and all.

How are you folx backing up to external storage, please? Sounds useful …

@RonJeffries - I have a lan on my router which has a Mac, a Nas and a lan drive. So I use the a filing app called File Explorer to export files from Codea to the storage. You can also use it for moving assets to an fro the Codea root.

If you’ve exported files as a zip you can load them using the filing app by the sharing option.

Other than that you can use @dave1707 ’s backup app to archive the code from projects (but not the assets) and save the backup files externally. Dropbox does this by using a Dropbox.assets folder in the Codea root and will save/retrieve data accordingly.

You can use the iPad Files app but I find that a little limited and temperamental.

Hope that helps.

Ah, cool, thanks!

@dave1707 - after all the cleanups, tried to link up Dropbox but there is still an issue there. Says it’s connected but no Dropbox.assets file in my Codea root. Tried the Dropbox sync button but that seems to have changed, there is no sync option there but there is a “sync and unlink” option. Is that relatively new? I presume it just functions like an update button.

@Simeon - whilst playing around with this it crashed Codea several times, nut set why - but if you received and crash reports, my apologies.

@Bri_G After reloading Codea, I did the Dropbox link and then the sync to reload the Codea Dropbox folder. To link Codea and Dropbox, tap the gear icon in the upper righ when Codea is first started. Scroll down to the Dropbox link buttons. That’s always been there if that’s what your asking about. Whenever you unlink Dropbox, it deletes everything in the Codea Dropbox folder. Once you relink and sync, everything downloads back.

I’m still having trouble with syncing on one of my iPads. Once I unlink, relink, and sync, everything works OK for a hour or so, then I can’t sync anything anymore. It’s not related to anything I do. Everything is fine after relinking. The iPad can sit there for an hour or so, then when I try syncing nothing works.

@dave1707 - hmmm, been looking into this. Not sure what my problem is but:
The Codea middle option for Dropbox is “Sync and Unlink” which I don’t remember from way back when my Dropbox was OK. That implies to me that the Dropbox.assets is updated and the the link cut, possibly to minimize load on the CPU.
Secondly, on searching I found that pre 2019 even if you had only three devices registered all devices you had used and registered before were still on your list. You have to delete all registered devices from your account and then re-register. Did that but didn’t help.

@Simeon - could you describe the function of the Dropbox options in that menu?

@Bri_G Not sure what you’re looking at. When I open Codea and see the list of projects, at the upper right of the screen is a gear icon. If I tap that and scroll down to Dropbox, it show an Unlink button and below the button it say “linked to (my name)”. On an iPad I don’t have linked to Dropbox, the button shows Link. I can only have 3 devices linked at any one time. I’m not sure what’s happening with Codea and Dropbox, but I have problems too.

@dave1707 - If you click on the link on project list screen, bottom right where it says Link or Unlink and tap on that you get 3 options
Sync and Unlink

Mine says Unlink in the button and below linked to my name.

Another thing I have noticed I used to have a a little blue star next to Apps and Codea in the path to my Dropbox folder - have you seen them and are they present for you?

@Bri_G I get the same thing with the 3 options. I don’t know anything about the blue stars, don’t recall seeing them.

@Bri_G I deleted Codea again and reloaded everything on my iPad Air 3. Looking at iPad storage, Codea size is 129 and Documents and Data is 174.3 . The Documents and Data size is what I think it should be since it’s close to what I got after the delete and reload on my iPhone at 172.7 . Now I just have to wait and see if the Dropbox sync keeps working.

@dave1707 - with that level are you seeing any slowing of your pad?

I’ve been playing but can’t seem to get Dropbox working properly. I’ve ended up minimal Installation of what I need at the moment, loading assets into the root in a folder which I’ne named resource.assets and added an Icon.png and Icon@2x.png together with a so that I can access directly.

Syncing with the button on the Projects page didn’t seem to work but from one of the assets windows the sync at the top right did seem to go through the motions of installing assets.

@Bri_G When I re-did Codea, I unlinked Dropbox which deleted everything in the Dropbox folder. I then deleted Codea using iPad storage. I then powered off the ipad for a minute or so and powered it back on. Reloaded Codea, linked Dropbox and synced the files, then downloaded the music and sound files in Codea. Then I used my program to load all my projects. It took about 4 tries to get everything loaded because of Codea hanging with it. So far Dropbox syncing seems to work OK.

My iPad seems to be running as fast as it’s been, didn’t notice any slowdown when the Codea size was around 700MB. I don’t have a lot of extra assets or anything, just the normal Codea stuff. I have a lot of small projects, about 800, so that shouldn’t slow things down.

@Bri_G Reloading Codea didn’t fix the Dropbox sync problem. Creating new text files and pressing sync does nothing but flash the word syncing on the screen. It’s like Codea doesn’t know it needs to send the files to Dropbox.

If I do an Export Projects to create a zip file, I can send that to Dropbox without any problems.

@dave1707 - Have you tried putting your files in the dropbox.assets folder and syncing that?

When I had few files to sync my iPad went through the motions but on my latest attempt to sync 714 files the operation froze. When I cancelled it it started switching out onto the project file page and froze. The image of that page was bigger than my iPad screen!!! Then Codea crashed. Sent in crash reports but not sure what @Simeon will be able to derive from them

I’ve resorted to the project assets files in my root which also gives a direct link from images etc in the project resources window.

@Bri_G I tried syncing from everywhere it’s available. After unlinking/relinking with Dropbox, syncing works for an hour or so and then it doesn’t. It’s like there’s a time limit to it. Haven’t found anything that causes it to stop, just a matter of time.