[FLUID-4922] Investigate performance of existing invoker system and implement "fast invokers" which cache arguments Created: 21/Feb/13  Updated: 03/Mar/14  Resolved: 17/Sep/13

Status: Closed
Project: Fluid Infusion
Component/s: IoC System
Affects Version/s: 1.4
Fix Version/s: 1.5

Type: Improvement Priority: Major
Reporter: Antranig Basman Assignee: Antranig Basman
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

With the resolution of FLUID-4709, the only remaining barrier to universal adoption of invokers as our solution for "methods" attached to the top level of components is their worrying performance issues, which have yet to be characterised, but are likely to be very serious.
Each call to an invoker causes a complete resolution of all IoC-resolved arguments - if any of them mention components other than "

{that}" this will cause a search up the component tree, and even if all non-argument positions resolve onto "{that}

" we will still take a very expensive trip through fluid.embodyDemands. We should by default instantiate invokers as "fast invokers" which will cache all material resolved in the component tree (except references into models), and only show changes in argument positions which refer on to

{arguments}

. This would enable invoker resolution to not be grievously slower than a standard method call after the first successful call.
A new notation dynamic: true attached to an invoker would restore the old behaviour for invokers which bind onto improperly changing material.
We should also in the far future consider a system similar to the DOM binder which is able to flush its cache under certain conditions where, for example, we apply some proper ChangeApplier semantics which do indeed support changes to component material outside their models - which we expect to occur on a much slower timescale than model-directed changes.
We should investigate and compare the performance of "slow" and "fast" invokers after this implementation and circulate guidelines on baseline performance expectations.



 Comments   
Comment by Colin Clark [ 17/Sep/13 ]

Fast invokers were reviewed and merged into master at a725f9d2a56a3ad4753efa12b1cd416b52937d1e.

Generated at Sun May 28 20:33:47 UTC 2017 using JIRA 7.3.6#73017-sha1:51437cf70ba5689aadb808c1cc05a46d676f5739.