[Engine-devel] synthetic-access

Hi, I am reviewing Allon's patches (e.g. http://gerrit.ovirt.org/#patch,sidebyside,2188,11,backend/manager/modules/da... ) and this is the first time I have met @SuppressWarnings("synthetic-access") annotations in the ovirt code. It is right, eclipse warns about the performance problem synthetic access (if turned on, by default it is turned off). This mostly happens in DAO's because rowmappers are private inner classes. What if, instead of adding an annotation to ignore this - we could make the rowmapper classes package protected? - or since most of these classes are stateless and thread safe, we can add a public final static rowmapper instance and instead of instantiating the rowmapper over and over again, use that single instance. Please share your thoughts. Thank you, Laszlo

On 02/29/2012 04:23 PM, Laszlo Hornyak wrote:
Hi,
I am reviewing Allon's patches (e.g. http://gerrit.ovirt.org/#patch,sidebyside,2188,11,backend/manager/modules/da... ) and this is the first time I have met @SuppressWarnings("synthetic-access") annotations in the ovirt code. It is right, eclipse warns about the performance problem synthetic access (if turned on, by default it is turned off). This mostly happens in DAO's because rowmappers are private inner classes. What if, instead of adding an annotation to ignore this - we could make the rowmapper classes package protected? - or since most of these classes are stateless and thread safe, we can add a public final static rowmapper instance and instead of instantiating the rowmapper over and over again, use that single instance. +1 on this, and I'm already giving comments to people on this issue (to make a single static instance of a mapper)
Please share your thoughts.
Thank you, Laszlo _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

On 02/29/2012 04:23 PM, Laszlo Hornyak wrote:
Hi,
I am reviewing Allon's patches (e.g. http://gerrit.ovirt.org/#patch,sidebyside,2188,11,backend/manager/modules/da... ) and this is the first time I have met @SuppressWarnings("synthetic-access") annotations in the ovirt code. It is right, eclipse warns about the performance problem synthetic access (if turned on, by default it is turned off). This mostly happens in DAO's because rowmappers are private inner classes. What if, instead of adding an annotation to ignore this - we could make the rowmapper classes package protected? - or since most of these classes are stateless and thread safe, we can add a public final static rowmapper instance and instead of instantiating the rowmapper over and over again, use that single instance. +1 on this, and I'm already giving comments to people on this issue (to make a single static instance of a mapper)
+1 this sounds like the right thing to do anyway.
Please share your thoughts.
Thank you, Laszlo _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

----- Original Message -----
From: "Mike Kolesnik" <mkolesni@redhat.com> To: "Yair Zaslavsky" <yzaslavs@redhat.com> Cc: "engine-devel" <engine-devel@ovirt.org> Sent: Wednesday, February 29, 2012 7:39:37 PM Subject: Re: [Engine-devel] synthetic-access
On 02/29/2012 04:23 PM, Laszlo Hornyak wrote:
Hi,
I am reviewing Allon's patches (e.g. http://gerrit.ovirt.org/#patch,sidebyside,2188,11,backend/manager/modules/da... ) and this is the first time I have met @SuppressWarnings("synthetic-access") annotations in the ovirt code. It is right, eclipse warns about the performance problem synthetic access (if turned on, by default it is turned off). This mostly happens in DAO's because rowmappers are private inner classes. What if, instead of adding an annotation to ignore this - we could make the rowmapper classes package protected? - or since most of these classes are stateless and thread safe, we can add a public final static rowmapper instance and instead of instantiating the rowmapper over and over again, use that single instance. +1 on this, and I'm already giving comments to people on this issue (to make a single static instance of a mapper)
+1 this sounds like the right thing to do anyway. +1 I've also begun doing this in my newer patches.
Please share your thoughts.
Thank you, Laszlo _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
participants (4)
-
Allon Mureinik
-
Laszlo Hornyak
-
Mike Kolesnik
-
Yair Zaslavsky