Re: Avoiding page loading

2023-07-12 Thread Thiago H. de Paula Figueiredo
Hello, Ben! Your suggestion is great and I've implemented it in https://github.com/apache/tapestry-5/commit/d6c4324215337b3bfb9ed8e62dd7174e0427410d . It's some code that will be called a low number times during the application runtime, so I decided to not try to optimize the just-1-page-name

Re: Avoiding page loading

2023-06-18 Thread Ben Weidig
Hi Thiago, I like your implementation as a general solution better, as it solves the problem in a simple and straightforward way, whereas my approach would only provide the tools to build a solution by yourself. One thing I might have added is a helper method in the ReferenceType to create the

Re: Avoiding page loading

2023-06-17 Thread Thiago H. de Paula Figueiredo
Hello! So I've just implemented what I suggested in Tapestry 5.8.3: https://issues.apache.org/jira/browse/TAP5-2756. Example: public static void contributePageCachingReferenceTypeService( OrderedConfiguration configuration) { configuration.add("VeryLarge", p ->

Re: Avoiding page loading

2023-01-05 Thread Ben Weidig
Hello! Your're right, overriding an internal service is usually an invitation for trouble with any bigger Tapestry update. Still, personally, I prefer a service override over cron jobs triggering things behind the scenes. Especially since it's one of Tapestry's greatest features to replace almost

Re: Avoiding page loading

2023-01-05 Thread Thiago H. de Paula Figueiredo
Hello, everyone! I prefer Ben's idea of a thread or cron job to keep it fresh other than overriding a service, especially now that I'm working on something (smarter page invalidation, which is actually smarter invalidation of some key Tapestry caches) which changes that PageSourceImpl a bit and

Re: Avoiding page loading

2023-01-03 Thread JumpStart
Thank you Ben. I may have to go this route if I can’t find a way to make the page much lighter to load. Geoff > On 28 Dec 2022, at 5:55 pm, Ben Weidig wrote: > > Hi Geoff, > > I've read through the SoftReference documentation and as far as I > understand it the references do only get

Re: Avoiding page loading

2022-12-28 Thread Ben Weidig
Hi Geoff, I've read through the SoftReference documentation and as far as I understand it the references do only get garbage-collected in case of memory-pressure. However, the behavior to keep recently used objects is only encouraged, not explicitly required. Looking over the source code, you