Re: Recompiling of .less file triggered in prod unexpectedly

2019-10-28 Thread JumpStart
Yep, that was the solution. I now cache hard references to the .less resources instead of SoftReferences. The page that uses the .less file no longer lags (except the first time after startup). In fact, I’m considering doing it for all assets, because I’m not clear on there being any benefit to

Re: Recompiling of .less file triggered in prod unexpectedly

2019-10-25 Thread JumpStart
Thank you Cezary. This is invaluable. As a first step I’ve added some logging of the caching to see whether this is the culprit. Geoff > On 25 Oct 2019, at 7:38 am, Cezary Biernacki wrote: > > Assuming that my suggestion is correct, the simplest solution would be to > give more heap space to J

Re: Recompiling of .less file triggered in prod unexpectedly

2019-10-24 Thread Cezary Biernacki
Assuming that my suggestion is correct, the simplest solution would be to give more heap space to JVM if there is enough RAM on machines you are deploying. Otherwise, I would attempt to create a StreamableResourceSource decorator that would cache only selected resources that are heavy to compute (

Re: Recompiling of .less file triggered in prod unexpectedly

2019-10-24 Thread JumpStart
That’s great information. So is the solution to precompile them for production, or to override SRSCachingInterceptor, or something else altogether? > On 24 Oct 2019, at 11:09 pm, Cezary Biernacki wrote: > > Tapestry caches compiled files in memory using SoftReference<> so it is > possible for t

Re: Recompiling of .less file triggered in prod unexpectedly

2019-10-24 Thread Cezary Biernacki
Tapestry caches compiled files in memory using SoftReference<> so it is possible for the garbage collector to remove them (see org.apache.tapestry5.internal.services.assets.SRSCachingInterceptor). In the development mode Tapestry also caches compilations in a temporary directory, but unfortunately

Recompiling of .less file triggered in prod unexpectedly

2019-10-23 Thread JumpStart
I’m observing that after startup, and then after every 20 minutes or so - actually, it seems to be quite variable - the first page after login will take 20 or more seconds to be displayed. The rest of the time it is almost instantaneous. I’ve run a sampler over it during one of these 20+ sec pe