Re: Seaside design issue

Esteban Maringolo <[email protected]> Thu, 31 Aug 2023 09:46:07 -0300
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <CAJMgPC+YJ=fs2Yj4Ms4Sc4+qgRK87PK90JCOnvS+6SQpz5wNTQ@mail.gmail.com>
--===============3738587347131210341==
Content-Type: multipart/alternative; boundary="000000000000b5b7080604376f90"

--000000000000b5b7080604376f90
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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=E2=80=AFAM Annick Fron <[email protected]> wr=
ote:

> 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=C3=BBt 2023 =C3=A0 14:07, Esteban Maringolo <[email protected]=
m> a =C3=A9crit
> :
>
> 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 t=
o
> 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=E2=80=AFAM Annick Fron <[email protected]> =
wrote:
>
>> Hi,
>>
>>         I use tables with items and use anchors for item lines to perfor=
m
>> 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 -- [email protected]
>> To unsubscribe send an email to [email protected]
>>
> _______________________________________________
> seaside mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>
>
> _______________________________________________
> seaside mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>

--000000000000b5b7080604376f90
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I don&#39;t know in which Smalltalk are you running Seasid=
e, and if this &quot;frozen access&quot; happens in production or just deve=
lopment.<div><br></div><div>But these situations often occur due to some th=
read related issues. E:g. one user of VAST just found that simply logging t=
o the Transcript within a Seaside callback during development was causing a=
 UI freeze, and that was because you shouldn&#39;t execute UI code outside =
of the UI thread. I experienced some locks using Glorp+Seaside in Pharo, an=
d it was due to a misuse of transactions/units-of-work.</div><div><br></div=
><div>Best regards,</div><div><div><br></div><div><br clear=3D"all"><div><d=
iv dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature"=
>Esteban A. Maringolo</div></div><br></div></div></div><br><div class=3D"gm=
ail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Aug 31, 2023 at 9:=
25=E2=80=AFAM Annick Fron &lt;<a href=3D"mailto:[email protected]">list@af=
ceurope.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex"><div>Hi Esteban,<div><br></div><div><span style=3D"white-space:p=
re-wrap">	</span>Thank you for your answer, I will try profiling.</div><div=
><br></div><div><span style=3D"white-space:pre-wrap">	</span>My issue is th=
at my database access is frozen from time to time, and I am trying to under=
stand what is going on. There might be a lot of possibilities, including ha=
cks on my database.</div><div><br></div><div><span style=3D"white-space:pre=
-wrap">	</span>Annick<br><div><div><br><blockquote type=3D"cite"><div>Le 31=
 ao=C3=BBt 2023 =C3=A0 14:07, Esteban Maringolo &lt;<a href=3D"mailto:emari=
[email protected]" target=3D"_blank">[email protected]</a>&gt; a =C3=A9cri=
t :</div><br><div><div dir=3D"ltr"><div>Hi Annick,</div><div><br></div><div=
>Either if you create a component that renders an anchor with a callback fo=
r each object or if you render a list or a table full with a callback to ea=
ch of them, all these callbacks are going=C2=A0to be added to the callback =
registry (WACallbackRegistry).</div><div><br></div><div>Depending on how yo=
u architecture your app (more or less AJAX oriented) you could use somethin=
g like JS&#39;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.</=
div><div><br></div><div>As for leaking callbacks, have you found any or pro=
filed the memory to confirm that it is leaking somewhere?</div><div><br></d=
iv><div>Best regards,</div><br clear=3D"all"><div><div dir=3D"ltr" class=3D=
"gmail_signature">Esteban A. Maringolo</div></div><br></div><br><div class=
=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Aug 31, 2023=
 at 7:19=E2=80=AFAM Annick Fron &lt;<a href=3D"mailto:[email protected]" t=
arget=3D"_blank">[email protected]</a>&gt; wrote:<br></div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid =
rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 I use tables with items and use anchors for ite=
m lines to perform some particular action on an item. This action is for in=
stance to call a specific component on that item.<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 If I have numerous items, I am worried about th=
e number of callbacks piling in and not being garbaged.<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Is it preferable to create a component per item=
 holding only one callback ?<br>
<br>
Annick<br>
_______________________________________________<br>
seaside mailing list -- <a href=3D"mailto:[email protected]=
g" target=3D"_blank">[email protected]</a><br>
To unsubscribe send an email to <a href=3D"mailto:[email protected]=
kfoundation.org" target=3D"_blank">[email protected]=
</a><br>
</blockquote></div>
_______________________________________________<br>seaside mailing list -- =
<a href=3D"mailto:[email protected]" target=3D"_blank">sea=
[email protected]</a><br>To unsubscribe send an email to <a h=
ref=3D"mailto:[email protected]" target=3D"_blank">s=
[email protected]</a><br></div></blockquote></div><br=
></div></div></div>_______________________________________________<br>
seaside mailing list -- <a href=3D"mailto:[email protected]=
g" target=3D"_blank">[email protected]</a><br>
To unsubscribe send an email to <a href=3D"mailto:[email protected]=
kfoundation.org" target=3D"_blank">[email protected]=
</a><br>
</blockquote></div>

--000000000000b5b7080604376f90--

--===============3738587347131210341==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
seaside mailing list -- [email protected]
To unsubscribe send an email to [email protected]

--===============3738587347131210341==--