DESCRIPTION

Bug 496795 - implement real hasAtrribute for WidgetElement and sub
classes

Change-Id: I97c22b818d2718530123d865d632873f0ae5809c
Signed-off-by: Bradley Booth <Emma xxx@xxx.xxx


COMMENTS

author: Bradley Booth
date: 2016-06-26 20:22:46.000000000

Uploaded patch set 7: Commit message was updated.

-------------------------------------
author: Brenden Conley
date: 2016-06-26 20:22:52.000000000

Patch Set 7:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9659/

-------------------------------------
author: Jayvion Booth
date: 2016-06-26 20:41:27.000000000

Patch Set 7: Code-Review-1

Why do you think that optimizing hasAttribute() case is worth to add extra cycles for getAttribute()? Do you have some performance numbers?
Also the assumption in the hasAttribute()  that having a non null supplier means it will provide non null attributes is at least very risky for an undocumented protected method.

-------------------------------------
author: Brenden Conley
date: 2016-06-26 20:45:03.000000000

Patch Set 7: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9659/ : UNSTABLE

-------------------------------------
author: Bradley Booth
date: 2016-06-27 17:35:14.000000000

Patch Set 7:

Jayvion Booth wrote: 
> Why do you think that optimizing hasAttribute() case is worth to add extra cycles for getAttribute()?

Actually ElementAdapter.hasAttribute does a full extra cycle for getAttribute. The idea is that the internalGetAttribute didn't do any work which is more costly than a map lookup.

> Do you have some performance numbers? 

I'm afraid not. If you can provide a pointer to a reasonable performance test example, I will try to write a test for this. 

> Also the assumption in the hasAttribute() that having a non null supplier means it will provide non null attributes is at least very risky for an undocumented protected method. 

You are right I will fix this.

Moreover the commit fixes the problem described in Bug 487994 for the SWT CSS code.

-------------------------------------
author: Gerrit Code Review
date: 2016-07-21 15:24:00.000000000

Change has been successfully merged into the git repository by Jayvion Booth

-------------------------------------
