96% code already used. How to manage it?

You'll need to clean up your code. The 3,000,000 character limit is the universal limit for any namespace. I've found that the typical code base can be optimized by at least 50%.

Try this:

Delete all your unit tests (or comment them out). Then, start writing use-based unit tests, covering each page, trigger, etc that you know you need. Then, review the code coverage results when you run all these tests, comment out unused code, then manually test all the functionality and see if anything is broken.

If not, you're done. If so, write a unit test for whatever is broken, restore code until it's not broken, and repeat the process until you're done.

Having a veteran/expert at the code might be worth hiring a contractor for a period of time. A competent developer can optimize dozens or hundreds of lines of code a day.

Also, see this question. So, looks like you can increase the limit, if you can prove you've done due diligence and already optimized your code.


You can raise case with salesforce support to increase the character limit ,provided you have a valid reason.


Another option might be to create a new sandbox from PROD. Presumably PROD isn't cluttered up with developer experiments or in-flight work. Then, add back into the new sandbox the relevant development from within the 96% sandbox.

The above might be more problematic if you are doing your dev in a fullcopy sandbox as getting a second temporary fullcopy sandbox may require assistance from your sfdc rep

Tags:

Limits

Code