<div dir="ltr"><div><div><div>Hello Alan,<br><br></div>Yes you are right. My approach was more a quick fix...maybe not so clean :)<br></div>The advantage of yours is that is built in a module and does not require to touch the core code of Vtiger<br></div>But indeed it would be interesting to have a comparison of the 2<br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">Christophe Humbert<br><br><br></div></div>
<br><div class="gmail_quote">On Wed, May 6, 2015 at 3:11 PM, Alan Bell <span dir="ltr"><<a href="mailto:alan.bell@libertus.co.uk" target="_blank">alan.bell@libertus.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
It would be interesting to compare the performance of the two
approaches, in the PHP server side method (your code) it is doing
all the counts before the page renders to the user, which should be
fairly quick, but any delay does impact directly on the page load
time. With my alternative approach there is no added delay in
rendering the page to the user, but once the page has arrived there
are a bunch of subsequence requests to the server for the counts. In
theory the same amount of processing, but any delay doesn't get
between the user and the page being in front of them. With the
javascript approach I can also do things like update the counts when
you do a quick create button, because that is all client side events
I can register for and respond to. Now on the down side, I make a
heap of extra small requests to the server, the policy of the
browser means you can only do 6 or so in parallel to the same
server, so you get to wait for some of them (which is also why the
calendar performance sucks) this extra waiting almost doesn't matter
for the counts, however if you go to detail mode and then quickly
hit edit you do end up for all the counts to resolve before your
edit request happens. If this was more of an issue I was thinking
that I could do a service in my module to get all the counts for
related lists in one request, basically serialise all the requests
together and deliver one answer to all of them. This is barely worth
doing for the purposes of updating the counts, but could be a
dramatically big fix for shared calendars with more than 6 people.<br>
<br>
Alan.<span class=""><br>
<br>
<br>
<div>On 06/05/15 10:00, Christophe Humbert
wrote:<br>
</div>
</span><blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div>Congratulations Alan<br>
<br>
</div>
I hope you reuse part of my code i posted some weeks ago<br>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div>Christophe Humbert<br>
<i>IT Program Manager</i><br>
<b>CoProcess S.A</b><br>
<a href="tel:%2B352%20691%20391%20974" value="+352691391974" target="_blank">+352 691 391 974</a><br>
<a href="tel:%2B33%206%2050%2009%2048%2088" value="+33650094888" target="_blank">+33 6 50 09 48 88</a><br>
Skype: chris.e.humbert<br>
<br>
</div>
</div>
<br>
<div class="gmail_quote">On Wed, May 6, 2015 at 10:21 AM, Alan
Bell <span dir="ltr"><<a href="mailto:alan.bell@libertus.co.uk" target="_blank">alan.bell@libertus.co.uk</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am
pleased to announce another module in the store, this one is
nice and straightforward and useful, in detail mode it adds
a count to the related item navigation on the right of the
screen. That way you can see from an organisation how many
trouble tickets or contacts or whatever that there are,
before clicking through all the links (or by pressing page
down if you have the Keyboard Junkie module installed).<br>
<br>
it is available now in the marketplace<br>
<a href="https://marketplace.vtiger.com/app/listings?id=148" target="_blank">https://marketplace.vtiger.com/app/listings?id=148</a><br>
<br>
or from github (clone, zip and enjoy)<br>
<a href="https://github.com/AlanBell/LSRelated" target="_blank">https://github.com/AlanBell/LSRelated</a><br>
<br>
Alan.<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a></pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br></div></div>