Closed chimon2000 closed 4 years ago
I noticed that the AbstractCommand checks to see if the context passed into the constructor matches a previously passed in context.
https://github.com/gskinnerTeam/flokk/blob/861553120f153a6cba8bf262d6fc02002234469b/flokk_src/lib/commands/abstract_command.dart#L25-L30
Wondering whether this done purely for perf gains, and if so how noticeable is the difference?
No, its just done because Provider will yell at us if we pass the top level context. Afaik there is virtually no overhead with these lookups.
I noticed that the AbstractCommand checks to see if the context passed into the constructor matches a previously passed in context.
https://github.com/gskinnerTeam/flokk/blob/861553120f153a6cba8bf262d6fc02002234469b/flokk_src/lib/commands/abstract_command.dart#L25-L30
Wondering whether this done purely for perf gains, and if so how noticeable is the difference?