[Vtigercrm-developers] Count all the things!
Alan Bell
alan.bell at libertus.co.uk
Wed May 6 13:11:03 GMT 2015
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.
Alan.
On 06/05/15 10:00, Christophe Humbert wrote:
> Congratulations Alan
>
> I hope you reuse part of my code i posted some weeks ago
>
> Christophe Humbert
> /IT Program Manager/
> *CoProcess S.A*
> +352 691 391 974
> +33 6 50 09 48 88
> Skype: chris.e.humbert
>
>
> On Wed, May 6, 2015 at 10:21 AM, Alan Bell <alan.bell at libertus.co.uk
> <mailto:alan.bell at libertus.co.uk>> wrote:
>
> 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).
>
> it is available now in the marketplace
> https://marketplace.vtiger.com/app/listings?id=148
>
> or from github (clone, zip and enjoy)
> https://github.com/AlanBell/LSRelated
>
> Alan.
> _______________________________________________
> http://www.vtiger.com/
>
>
>
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150506/82db390e/attachment.html>
More information about the vtigercrm-developers
mailing list