Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Super sleak


This sounds great, Chris!

Please open a feature request in eclipse Bugzilla under "eclipse - platform - swt", and attach your patch. If you did any refactoring or reformatting or reorganizing of the code, please revert it for now - we can refactor later, but stuff like refactoring and reformatting make it impossible to see the real changes. Maybe browse changes yourself first to make sure that you are submitting only the real code changes.

Regarding adding callbacks to Device, we agree that this would add greater fidelity, but it would have some fairly complicated API & design considerations because currently the swt graphics package does not have any callback (listener) mechanism.

We are fine with adding another long[] to Device to track creation times.

Thanks very much for your contribution!
Carolyn




Chris Grindstaff <chris@xxxxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

01/30/2007 11:04 PM

Please respond to
Chris Grindstaff <chris@xxxxxxxxxx>; Please respond to
"Eclipse Platform SWT component developers list."        <platform-swt-dev@xxxxxxxxxxx>

To
"Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
cc
Subject
[platform-swt-dev] Super sleak





I'm putting together an EclipseCon talk titled: Super sleak The
presentation focuses on changes I've made to Sleak that I and others
have found very useful. I'm interested in contributing them but wanted
to run them by folks here first.

They are:
1) Find duplicate images, fonts, colors
This has been great to find places that images should be shared but
aren't.

2) Track resources with timestamps.
I basically added a timestamp column to the UI. This has proved useful
when looking at resource usage over time.

My implementation is limited because I didn't modify SWT, which means
in reality it's the time you snapped instead of the time the resource
was created. Useful but I would prefer to track the creation time.

It would be a straightforward change to Device, basically adding a
long[] beside the error and object[], or better yet add a callback
that Sleak could hook and track the times itself.

3) Track image burn.
Image burn is when an image is persistently created and disposed. This
may indicate a performance problem, misunderstanding, etc.
In addition to the "# of duplicates" column I added a "times created"
column which tells you how many times you've snapped this
image/color/font.

For example, this could tell you that you have 1 "live" image but
you've created that image 20 previous times. Because of how Sleak is
implemented, it means you've snapped 20 previous times to "know" that
the create/dispose occurred.

The changes I've made in Sleak are useful, but even better tracking
and fidelity could be achieved if Device.dispose_Object and
Device.new_Object provided a callback.

I understand the performance and safety implications that adding a
callback introduce but since those methods are already guard-claused
the impact would be minimal.

So specifically, what do folks think of:

A. Adding an SWT callback to dispose_Object/new_Object
B. Changing Sleak to use the callback
C. Contribute the Sleak changes mentioned above

I'd love to make the changes,
Chris
--
Chris Grindstaff | http://gstaff.org

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top