You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Ca...@csiro.au on 2013/05/02 04:44:50 UTC

[beanutils] Bad performance of MethodUtils#getMatchingAccessibleMethod due to Logger use

I'm currently tracking down performance issues in a highly multi-threaded application which heavily uses BeanUtils (1.8.3). I identified MethodUtils#getMatchingAccessibleMethod as a major problem. Especially its call to


        Log log = LogFactory.getLog(MethodUtils.class);

for each invocation. In my environment, using log4j, this always involves a call to HashTable which is synchronised. This causes a lot of waiting time in that call in my application.

Please consider using a static logger on class level rather than the new logger for each invocation of MethodUtils#getMatchingAccessibleMethod.

Cheers,
Carsten


Re: [beanutils] Bad performance of MethodUtils#getMatchingAccessibleMethod due to Logger use

Posted by Benedikt Ritter <br...@apache.org>.
I have created BEANUTILS-439 [1] for this issue. I'll wait for another few
days to give others a chance to create a patch before I fix this myself.

Benedikt

[1] https://issues.apache.org/jira/browse/BEANUTILS-439


2013/5/2 Benedikt Ritter <br...@apache.org>

> Hi Carsten,
>
> thanks for your report. The usual way to report any kind of
> bug/enhancement is to file an issue in Jira [1]. If you attach your
> proposal as SVN diff file, we can acknowledge your contribution in the
> contributors section of the components website.
>
> [1] https://issues.apache.org/jira
>
>
> 2013/5/2 <Ca...@csiro.au>
>
> I'm currently tracking down performance issues in a highly multi-threaded
>> application which heavily uses BeanUtils (1.8.3). I identified
>> MethodUtils#getMatchingAccessibleMethod as a major problem. Especially its
>> call to
>>
>>
>>         Log log = LogFactory.getLog(MethodUtils.class);
>>
>> for each invocation. In my environment, using log4j, this always involves
>> a call to HashTable which is synchronised. This causes a lot of waiting
>> time in that call in my application.
>>
>> Please consider using a static logger on class level rather than the new
>> logger for each invocation of MethodUtils#getMatchingAccessibleMethod.
>>
>> Cheers,
>> Carsten
>>
>>
>
>
> --
> http://people.apache.org/~britter/
> http://www.systemoutprintln.de/
> http://twitter.com/BenediktRitter
> http://github.com/britter
>



-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter

Re: [beanutils] Bad performance of MethodUtils#getMatchingAccessibleMethod due to Logger use

Posted by Benedikt Ritter <br...@apache.org>.
Hi Carsten,

thanks for your report. The usual way to report any kind of bug/enhancement
is to file an issue in Jira [1]. If you attach your proposal as SVN diff
file, we can acknowledge your contribution in the contributors section of
the components website.

[1] https://issues.apache.org/jira


2013/5/2 <Ca...@csiro.au>

> I'm currently tracking down performance issues in a highly multi-threaded
> application which heavily uses BeanUtils (1.8.3). I identified
> MethodUtils#getMatchingAccessibleMethod as a major problem. Especially its
> call to
>
>
>         Log log = LogFactory.getLog(MethodUtils.class);
>
> for each invocation. In my environment, using log4j, this always involves
> a call to HashTable which is synchronised. This causes a lot of waiting
> time in that call in my application.
>
> Please consider using a static logger on class level rather than the new
> logger for each invocation of MethodUtils#getMatchingAccessibleMethod.
>
> Cheers,
> Carsten
>
>


-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter