You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Imre András Róbert <im...@mail.tvnet.hu> on 2007/03/26 23:48:36 UTC

Re[8]: Bean Shell Scripting

Friday, March 23, 2007, 9:08:04 PM, you wrote:
>>> No, but I use my little modification which actually gets rid of
>>> the BeanShellScripts cache. This is a real turn-off with no
>>> overhead. Currently hardwired, but with a little more coding
>>> it could easily be controlled via properties, if needed. Could
>>> be applied to all caches not just BeanShellScripts.
>>
>> This might be interesting. Would you consider to open a Jira issue for
>> this ?

> Why would we want to do this?

> The main reason I consider a cache timeout to be an adequate disable
> mechanism is that the performance overhead for maintain the cache is
> NOTHING compared to the performance impact of having the cache  
> disabled (maybe 1000:1, perhaps 100,000:1 for reloading and parsing a
> BSH script).

I think all this boils down to the following:

- In either production or development we should always use cache for
  performance, but with adequately large expiration time in order to
  avoid the overhead.
- In development we can simulate turning off with setting expiration
  time to an extremely low level with a tradeoff
- To turn off the cache entirely implementing a new feature would be
  needed (would also help later to decide whether a certain problem
  is cache related or not)

So far it is only me who is not happy with the workaround. Jacques
might also find this idea useful.

I think it's up to the ofbiz community to decide, whether a real turn
off of cacheing feature is needed or not. Please let me know how the
community decides about this (vote/jira etc).


Thanks,
  András

> -David



Re: Bean Shell Scripting

Posted by "David E. Jones" <jo...@hotwaxmedia.com>.
On Mar 26, 2007, at 9:38 PM, Jonathon -- Improov wrote:

> Hi Imre,
>
> Turning off caching will mean OFBiz reloads/recompiles on every web  
> request, right?
>
> Say the caching is set to have a expiration time of 0, then OFBiz  
> would simply:

Just an FYI: an expire time of 0 means no expiration, or expiration  
disabled. If you want to "disable" the cache through expiration, an  
expire time of 1 means 1 millisecond which effectively kills it.

On a side note for Imre and to add to what Jonathon said: for  
development we DO NOT want a hard disable because certain resources  
would be read many time in a single page request... in some cases  
dozens! So, we do a 10 second timeout which is a nice balance between  
refresh time, and not making single requests super inefficient.

-David



Re: Bean Shell Scripting

Posted by Jonathon -- Improov <jo...@improov.com>.
Hi Imre,

Turning off caching will mean OFBiz reloads/recompiles on every web request, right?

Say the caching is set to have a expiration time of 0, then OFBiz would simply:

1. Check the cache engine and find out that the cache is expired.

2. Reload/recompile whatever needs reloading/recompiling.

As David said, step 2 is way more computationally expensive than step 1. It is my opinion too that 
removing/optimizing step 1 wouldn't give any more than maybe 1% performance improvement.

In short, the cost of step 1 is amortized by the cost of step 2.

Jonathon

Imre András Róbert wrote:
> Friday, March 23, 2007, 9:08:04 PM, you wrote:
>>>> No, but I use my little modification which actually gets rid of
>>>> the BeanShellScripts cache. This is a real turn-off with no
>>>> overhead. Currently hardwired, but with a little more coding
>>>> it could easily be controlled via properties, if needed. Could
>>>> be applied to all caches not just BeanShellScripts.
>>> This might be interesting. Would you consider to open a Jira issue for
>>> this ?
> 
>> Why would we want to do this?
> 
>> The main reason I consider a cache timeout to be an adequate disable
>> mechanism is that the performance overhead for maintain the cache is
>> NOTHING compared to the performance impact of having the cache  
>> disabled (maybe 1000:1, perhaps 100,000:1 for reloading and parsing a
>> BSH script).
> 
> I think all this boils down to the following:
> 
> - In either production or development we should always use cache for
>   performance, but with adequately large expiration time in order to
>   avoid the overhead.
> - In development we can simulate turning off with setting expiration
>   time to an extremely low level with a tradeoff
> - To turn off the cache entirely implementing a new feature would be
>   needed (would also help later to decide whether a certain problem
>   is cache related or not)
> 
> So far it is only me who is not happy with the workaround. Jacques
> might also find this idea useful.
> 
> I think it's up to the ofbiz community to decide, whether a real turn
> off of cacheing feature is needed or not. Please let me know how the
> community decides about this (vote/jira etc).
> 
> 
> Thanks,
>   András
> 
>> -David
> 
> 
>