heres some advice which has helped me-
when i use the painted shader a lot in a project i make incremental saves, usually after every successful painted shader session i will make an incremental save, that way if it crashes, later onm i can just go back to a previous version of the Tgd