Hacker News new | ask | show | jobs
by robmccoll 4331 days ago
On the 65K methods restriction, how many lines of code per method do these projects have on average? That just seems like a lot of code. Is this a result of the Java acessor-and-mutator-methods-for-everything approach?

For reference, Tomcat and Maven are both 1M lines of code (would be ~15 lines of code per method @ 65K methods). Lucene is <500K.

1 comments

I used to think this was a non issue. 65k methods is a lot right? Well I ran into the 65k method limit with my one developer game I'm working on. Can't remember if it while i was using gradle or maven(recent switched) but it would print out all the methods for each package. Method counts add up quick when you are importing libraries. For example google guice by it self(if memory servers me) had ~6k methods. Thats one library. Starting adding different Apache libraries and its possible. Granted the majority of these get stripped out by Proguard, but having to run proguard for every build is a major pain. I have since refactored and am now well under the limit, but this issue is a lot more prevalent then i thought.