CC3000 memory footprint

I am using the CC3000 on Leonardo. The Adafruit CC3000 library uses most of the available flash, so that my application does not fit.
Does anyone have an idea how to make the library smaller?
I only need a webclient.

What version of the IDE are you using? Try 1.5.7 if you are using an earlier version. Its compiler produces much more compact code than previous versions. You can also change inheritance of the CC3000 client class from Client to Print in Adafruit_CC3000.h

//class Adafruit_CC3000_Client : public Client {   
class Adafruit_CC3000_Client : public Print {  // <--

That will reduce the size of the library footprint a bit. You lose some compatibility with the Ethernet shield, but that’s not a real issue in most cases. If you are using the server, you need to change Adafruit_CC3000_Server.h similarly:

//class Adafruit_CC3000_ClientRef : public Client {  
class Adafruit_CC3000_ClientRef : public Print {  // <--

If you are using example code from Adafruit sketches, note that there is no code to deal with WLAN disconnects, which happen from time to time for reasons I am unclear about. It’s been blamed on noise or whatever, but I have 3 of them running and they all lose WLAN connectivity at the same time, probably as a result of some router event (but not, I believe DHCP lease expiration), so code for that. If you disconnect, you need to do a .reboot() and then restart entire initialization sequence. Search the Adarfruit forum Other Adafruit Products for “guard code” for a discussion.

Thanks for your answer. I am looking to do some deeper cuts, maybe you or someone can provide guidance.
My project is UDP receive and reply only. I was thinking fixed ip and DNS, fastconnect and UDP socket layer. With this subset I was hoping to eliminate as much as possible from the lib to save flash and mem. Any ideas on where to start?