Hi,
I use tables with items and use anchors for item lines to perform some particular action on an item. This action is for instance to call a specific component on that item.
If I have numerous items, I am worried about the number of callbacks piling in and not being garbaged.
Is it preferable to create a component per item holding only one callback ?
Annick
Hi Annick,
Either if you create a component that renders an anchor with a callback for each object or if you render a list or a table full with a callback to each of them, all these callbacks are going to be added to the callback registry (WACallbackRegistry).
Depending on how you architecture your app (more or less AJAX oriented) you could use something like JS's #callback:passenger: helper method. But if your purpose is to drive a full page call/answer: then AJAX would not be an option there.
As for leaking callbacks, have you found any or profiled the memory to confirm that it is leaking somewhere?
Best regards,
Esteban A. Maringolo
On Thu, Aug 31, 2023 at 7:19 AM Annick Fron list@afceurope.com wrote:
Hi,
I use tables with items and use anchors for item lines to perform
some particular action on an item. This action is for instance to call a specific component on that item.
If I have numerous items, I am worried about the number of
callbacks piling in and not being garbaged.
Is it preferable to create a component per item holding only one
callback ?
Annick _______________________________________________ seaside mailing list -- seaside@lists.squeakfoundation.org To unsubscribe send an email to seaside-leave@lists.squeakfoundation.org
Hi Esteban,
Thank you for your answer, I will try profiling.
My issue is that my database access is frozen from time to time, and I am trying to understand what is going on. There might be a lot of possibilities, including hacks on my database.
Annick
Le 31 août 2023 à 14:07, Esteban Maringolo emaringolo@gmail.com a écrit :
Hi Annick,
Either if you create a component that renders an anchor with a callback for each object or if you render a list or a table full with a callback to each of them, all these callbacks are going to be added to the callback registry (WACallbackRegistry).
Depending on how you architecture your app (more or less AJAX oriented) you could use something like JS's #callback:passenger: helper method. But if your purpose is to drive a full page call/answer: then AJAX would not be an option there.
As for leaking callbacks, have you found any or profiled the memory to confirm that it is leaking somewhere?
Best regards,
Esteban A. Maringolo
On Thu, Aug 31, 2023 at 7:19 AM Annick Fron <list@afceurope.com mailto:list@afceurope.com> wrote:
Hi,
I use tables with items and use anchors for item lines to perform some particular action on an item. This action is for instance to call a specific component on that item. If I have numerous items, I am worried about the number of callbacks piling in and not being garbaged. Is it preferable to create a component per item holding only one callback ?
Annick _______________________________________________ seaside mailing list -- seaside@lists.squeakfoundation.org mailto:seaside@lists.squeakfoundation.org To unsubscribe send an email to seaside-leave@lists.squeakfoundation.org mailto:seaside-leave@lists.squeakfoundation.org
seaside mailing list -- seaside@lists.squeakfoundation.org To unsubscribe send an email to seaside-leave@lists.squeakfoundation.org
I don't know in which Smalltalk are you running Seaside, and if this "frozen access" happens in production or just development.
But these situations often occur due to some thread related issues. E:g. one user of VAST just found that simply logging to the Transcript within a Seaside callback during development was causing a UI freeze, and that was because you shouldn't execute UI code outside of the UI thread. I experienced some locks using Glorp+Seaside in Pharo, and it was due to a misuse of transactions/units-of-work.
Best regards,
Esteban A. Maringolo
On Thu, Aug 31, 2023 at 9:25 AM Annick Fron list@afceurope.com wrote:
Hi Esteban,
Thank you for your answer, I will try profiling.
My issue is that my database access is frozen from time to time, and I am trying to understand what is going on. There might be a lot of possibilities, including hacks on my database.
Annick
Le 31 août 2023 à 14:07, Esteban Maringolo emaringolo@gmail.com a écrit :
Hi Annick,
Either if you create a component that renders an anchor with a callback for each object or if you render a list or a table full with a callback to each of them, all these callbacks are going to be added to the callback registry (WACallbackRegistry).
Depending on how you architecture your app (more or less AJAX oriented) you could use something like JS's #callback:passenger: helper method. But if your purpose is to drive a full page call/answer: then AJAX would not be an option there.
As for leaking callbacks, have you found any or profiled the memory to confirm that it is leaking somewhere?
Best regards,
Esteban A. Maringolo
On Thu, Aug 31, 2023 at 7:19 AM Annick Fron list@afceurope.com wrote:
Hi,
I use tables with items and use anchors for item lines to perform
some particular action on an item. This action is for instance to call a specific component on that item.
If I have numerous items, I am worried about the number of
callbacks piling in and not being garbaged.
Is it preferable to create a component per item holding only one
callback ?
Annick _______________________________________________ seaside mailing list -- seaside@lists.squeakfoundation.org To unsubscribe send an email to seaside-leave@lists.squeakfoundation.org
seaside mailing list -- seaside@lists.squeakfoundation.org To unsubscribe send an email to seaside-leave@lists.squeakfoundation.org
seaside mailing list -- seaside@lists.squeakfoundation.org To unsubscribe send an email to seaside-leave@lists.squeakfoundation.org
seaside@lists.squeakfoundation.org