From: Panayotis K. <pan...@pa...> - 2011-06-10 12:26:41
|
On 10 Ιουν 2011, at 3:11 μ.μ., Sascha Haeberling wrote: > Panayotis, > > sorry, I didn't understand what you mean. What do you mean by "the library"? The C backend does compute all dependencies so that the number of classes that are compiled and outputted in the end is at a minimum. Only required classes will be pulled in. Why would you want to replace this and with what? > > // Sascha This is from an old discussion. The idea is to compile the whole JDK and iPhone compatibility library (and probably other dependencies) into a C library (i.e. in a form of .a file) and compile the project against this library. Thus the Xcode project will compile much much faster and even the production of the Xcode project will be faster (and smaller) since no files from the JDK and the compatibility library will be required any more. This idea was also in the earlier days of ObjC backend, but due to the way ObjC handled dependencies and late binding, the gain was far less. Now with the strong typed C language, things should be much better. For example, if a function is not used at all, the C compiler understands that and never embeds it into the output binary - we have optimizations in the method-level, instead of the class-level. I don't know how virtual functions are handled and probably Arno could help with this. PS: I remember that ProGuard is also able to perform this type of optimizations and it is already used for this reason in Android projects. Probably we should also do something similar? |