简体   繁体   English

如何在flex / actionscript 3中找到在哪里创建对象?

[英]How to find where an object is created in flex/actionscript 3?

In my project I have noticed 20-40% CPU time when my app is idle. 在我的项目中,我注意到我的应用程序空闲时有20-40%的CPU时间。
In debugger when I pause I always land on a flex.utils.Timer/tick. 在调试器中,当我暂停时,我总是会遇到flex.utils.Timer / tick。
This timer has 30ms delay between "ticks" 此计时器在“滴答声”之间有30毫秒的延迟

I didn't create that Timer... so this is problably a component I have added 我没有创建计时器...所以这可能是我添加的组件

Unfortunately it will be difficult to remove all compenents until if find the "one" .. 不幸的是,除非找到“一个”,否则将很难删除所有组件。
Yes I should have notice the CPU usage sooner ! 是的,我应该早点注意到CPU使用率!
and yes I will do that if I don't find another solution 是的,如果找不到其他解决方案,我会这样做

I am of course using some components without having their sources... 我当然在使用某些组件而没有它们的来源...

My questions : 我的问题:
* How can I find the guilty component ? *如何找到有罪成分?
* I tried to find it using Kap Inspector without success ...any tips for Kap inspector ? *我尝试使用Kap检查器找到它,但没有成功...有关Kap检查器的任何提示?
* Is there another great tool to track object creation ? *是否有另一个伟大的工具来跟踪对象创建?

Thanks for your help 谢谢你的帮助

No idea about Flex, but for your CPU problems, check this out: 不知道Flex,但对于您的CPU问题,请查看以下内容:

http://www.gskinner.com/blog/archives/2009/05/idle_cpu_usage.html http://www.gskinner.com/blog/archives/2009/05/idle_cpu_usage.html

When you set your breakpoint, in the Flex Debugger perspective, find the Variables tab/view. 设置断点时,在“ Flex调试器”透视图中,找到“变量”选项卡/视图。 From there, with your breakpoint set, you should be able to see all of the variables currently in local scope (local to the timer-tick event handler, that is). 从那里,在设置断点的情况下,您应该能够看到当前在本地范围内的所有变量(也就是说,对于计时器滴答事件处理程序是本地的)。 The event variable will contain information about the timer itself -- eg, in event.target -- and the this variable will tell you where the timer handler is defined. event变量将包含有关计时器本身的信息(例如在event.target中),并且this变量将告诉您计时器处理程序的定义位置。

From there, you might be able to walk back up the stack trace, using the Debug tab/view (with your breakpoint still set), to get a sense of where the Timer object might've been instantiated. 从那里,您可以使用Debug(调试)选项卡/视图(仍设置断点)向后追溯堆栈跟踪,以了解Timer对象的实例化位置。 If that doesn't work, you can download a trial of Flex Builder Professional here: 如果这不起作用,则可以在此处下载Flex Builder Professional试用版:

http://www.adobe.com/cfusion/entitlement/index.cfm?e=flexbuilder3 http://www.adobe.com/cfusion/entitlement/index.cfm?e=flexbuilder3

... and give the built-in profiler a try. ...并尝试内置的探查器。 Hope that helps point you in a helpful direction! 希望能为您指明有用的方向!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在flex中放置actionscript的位置? - where to put actionscript in flex? 捕获使用ActionScript创建但未添加到舞台的Flex显示对象的“屏幕快照” - Capture “screenshot” of Flex Display Object created with ActionScript but not added to stage 如何捕获在actionscript和flex中动态创建的textinput值? - how to capture the textinput value created dynamically in actionscript and flex? 如何通过flex / actionscript中的属性名称/值查找特定的xml数据 - how to find specific xml data by attribute name/value in flex / actionscript Actionscript 3、flex:如何知道你当前使用的是哪个浏览器? - Actionscript 3, flex: How to find out which is browser you are currently in? actionscript(flex):如何知道对象的属性是否存在(或定义)? - actionscript (flex): how to know whether a property of object exists (or defined)? Flex Mobile动作脚本如何按对象的一部分按字母顺序对arrayCollection进行排序 - Flex Mobile actionscript how to alphabetically sort a arrayCollection by a portion of a object 如何在运行时从xsd模式转到Actionscript对象(Flex)? - How to go from xsd schema to Actionscript object (Flex) at runtime? Actionscript / flex中的简单相机如何? - Simple Camera in Actionscript/flex How to? 转换如何在ActionScript或Flex中工作? - how transform works in actionscript or flex?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM