Link Details

Link 134254 thumbnail
User 111696 avatar

By bloid
via onyxbits.de
Published: Nov 17 2008 / 04:52

Three days ago, I posted a design pattern for menubars. While the article was mainly about code clarity and the clumsiness of inner classes, it also contained some remarks concerning performance and naturally this puts me in a put up or shut up situation, even though a performance discussion was not really my intention.
  • 5
  • 0
  • 821
  • 277

Comments

Add your comment
User 231703 avatar

MattRussell replied ago:

0 votes Vote down Vote up Reply

Kudos for running the numbers. (An extra observation: Pack200 would mean the difference between the compressed code size is about 4.2k vs 1.5k.) Personally, I'd conclude that the performance difference is negligible for anywhere you'd be running Swing, and the question is really one of which implementation is clearer. What would ultimately be the cleanest solution to wiring up behaviour to menus, that is, adding full closure support in the language, would almost certainly be implemented under the hood by lots of small synthetic classes, and would therefore incur a similar performance hit.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (5)



Voters Against This Link (0)