30K lines compiled down for a MEGA2560 suggests the code is not as optimal as it could be.
With typical coding style - I'd expect a 2560 to be getting pretty 'full' around 20K source lines. of course there could be a lot of blank lines, or huge blocks of comments.
Just curious - that's a lot of source code for a small micro.