Comments on: ItDepends: Code Dependency Analysis For Flex/AIR Applications http://joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/ Just another WordPress weblog Fri, 13 Aug 2010 18:04:58 -0400 http://wordpress.org/?v=2.8.5 hourly 1 By: joe http://joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/comment-page-1/#comment-208 joe Wed, 09 Apr 2008 01:43:30 +0000 http://www.joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/#comment-208 Ryan -- can you please create a bug on Google Code and attach your link report so I can try to reproduce the bug? Thanks! Ryan — can you please create a bug on Google Code and attach your link report so I can try to reproduce the bug? Thanks!

]]>
By: Ryan http://joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/comment-page-1/#comment-210 Ryan Tue, 08 Apr 2008 22:50:53 +0000 http://www.joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/#comment-210 It doesn't seem to work properly for generated classes. For example, I look at mx.skins.halo.HaloBorder and it says it's referred to by nothing, which doesn't make much sense. However, if you look at _globalStyle (atleast in my case), you'll see that ItDepends correctly reports that it refers to mx.skins.halo.HaloBorder. It doesn’t seem to work properly for generated classes. For example, I look at mx.skins.halo.HaloBorder and it says it’s referred to by nothing, which doesn’t make much sense. However, if you look at _globalStyle (atleast in my case), you’ll see that ItDepends correctly reports that it refers to mx.skins.halo.HaloBorder.

]]>
By: joe http://joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/comment-page-1/#comment-209 joe Wed, 02 Apr 2008 23:37:18 +0000 http://www.joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/#comment-209 Yes, Jono, I am getting the sizes directly from the link report. At the time I wrote it I didn't have access to the compiler. Now that I do, it should be possible to get much more exact numbers by instrumenting the bytecode emitter and global optimizer. But I've found that exact numbers are not really important -- it's more a question of where the "center of gravity" lies in the app. Although the numbers are not correct in absolute terms (generally they are inflated by a factor of 6 or so), they are quite useful as a proportional measure of where the code size lies in the app. In typical Flex apps, shared constants do not seem to take up a very large portion of the code. ItDepends does in fact have the same diff capability built into it -- if you create a child module window from the main app window, and drag app classes into the module, all the dependencies removed from the main app will travel into the module. In the meantime ItDepends does have a crude ability to read the output dumps from the SwfxPrinter tool and map the printed function names back into the classes they come from. Those code sizes are super accurate but of course there is no dependency info there. Yes, Jono, I am getting the sizes directly from the link report. At the time I wrote it I didn’t have access to the compiler. Now that I do, it should be possible to get much more exact numbers by instrumenting the bytecode emitter and global optimizer. But I’ve found that exact numbers are not really important — it’s more a question of where the “center of gravity” lies in the app.

Although the numbers are not correct in absolute terms (generally they are inflated by a factor of 6 or so), they are quite useful as a proportional measure of where the code size lies in the app. In typical Flex apps, shared constants do not seem to take up a very large portion of the code.

ItDepends does in fact have the same diff capability built into it — if you create a child module window from the main app window, and drag app classes into the module, all the dependencies removed from the main app will travel into the module.

In the meantime ItDepends does have a crude ability to read the output dumps from the SwfxPrinter tool and map the printed function names back into the classes they come from. Those code sizes are super accurate but of course there is no dependency info there.

]]>
By: Jono http://joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/comment-page-1/#comment-215 Jono Wed, 02 Apr 2008 22:31:40 +0000 http://www.joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/#comment-215 Are you getting the sizes directly from the link report (I cannot imagine where else you get them from)? I wrote a very similar tool to try to do framework optimization (I can share it with you offline), but found that the numbers in the report are pretty much useless except as extremely high upper bounds. For one, they are unoptimized (I forget if I committed an update to the link report which spits out a slightly optimized value as well). The biggest issue is that they don't take into account the constant pool -- if 100 strings are shared between two classes, each class will report that they take up the space of 100 strings, and the size changes between compiles depending on other factors. I find the link report most useful to track new and removed dependencies. I should probably open-source my diff tool. Are you getting the sizes directly from the link report (I cannot imagine where else you get them from)? I wrote a very similar tool to try to do framework optimization (I can share it with you offline), but found that the numbers in the report are pretty much useless except as extremely high upper bounds.

For one, they are unoptimized (I forget if I committed an update to the link report which spits out a slightly optimized value as well). The biggest issue is that they don’t take into account the constant pool — if 100 strings are shared between two classes, each class will report that they take up the space of 100 strings, and the size changes between compiles depending on other factors.

I find the link report most useful to track new and removed dependencies. I should probably open-source my diff tool.

]]>
By: joe http://joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/comment-page-1/#comment-214 joe Fri, 28 Mar 2008 14:57:09 +0000 http://www.joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/#comment-214 No, the compiler (and hence ItDepends) has no idea if you are using getDefinitionByName() to find your classes. On the other hand, your renderer class wouldn't be linked into the app if there wasn't some compile-time dependency somewhere. No, the compiler (and hence ItDepends) has no idea if you are using getDefinitionByName() to find your classes. On the other hand, your renderer class wouldn’t be linked into the app if there wasn’t some compile-time dependency somewhere.

]]>
By: Tom Lee http://joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/comment-page-1/#comment-213 Tom Lee Fri, 28 Mar 2008 13:53:14 +0000 http://www.joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/#comment-213 Awesome - a great contribution to the community. One of the issues I occasionally run into when porting code is a dependency on a class that may only be referenced in a string. For example, a dataTipRenderer for a chart. Does your application locate those dependencies as well? Awesome – a great contribution to the community.

One of the issues I occasionally run into when porting code is a dependency on a class that may only be referenced in a string. For example, a dataTipRenderer for a chart. Does your application locate those dependencies as well?

]]>
By: JesterXL http://joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/comment-page-1/#comment-212 JesterXL Thu, 27 Mar 2008 03:10:12 +0000 http://www.joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/#comment-212 Bad ass!!! Bad ass!!!

]]>
By: Rex Sheridan http://joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/comment-page-1/#comment-211 Rex Sheridan Thu, 27 Mar 2008 02:21:54 +0000 http://www.joeberkovitz.com/blog/2008/03/26/itdepends-code-dependency-analysis-for-flexair-applications/#comment-211 Neat little app. I never knew the Flex compiler could spit out so much information. Neat little app. I never knew the Flex compiler could spit out so much information.

]]>