> On Jan. 25, 2016, 5:12 p.m., Jie Yu wrote:
> > I am wondering if you do see performance issue regarding this? We typically 
> > don't optimize the code too much until it becomes a problem. Also, we try 
> > to avoid global variable dependencies (i.e., static bool isCreateError in 
> > this case).

Jie, thanks for looking at this. 

This change is two parts - one is simply replacing the initialization of 
`creators` hashmap. Initialization using universal `{` initialization is the 
preferred way in c++11 that calling `put`. 

The second change is to optimize the creation. I thought this was necessary 
because we will be calling `create` for every URI fetch in a image pull and its 
dependencies(or layers). As the information to create the fetcher does not 
change for each of that `create` call, I thought it would be better to reuse 
the initialized structures. 

We can remove the 2nd part (optimization) if you like.


- Jojy


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41959/#review116115
-----------------------------------------------------------


On Jan. 13, 2016, 11:08 p.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41959/
> -----------------------------------------------------------
> 
> (Updated Jan. 13, 2016, 11:08 p.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Since fetcher plugins are not dynamically pluggable today, simplified the
> factory method to use the statically intitalized plugins. This would be
> useful when Fetchers are created multiple times.
> 
> 
> Diffs
> -----
> 
>   src/uri/fetcher.cpp dfda732348fec3b686cf82b55ad94fda4829469b 
> 
> Diff: https://reviews.apache.org/r/41959/diff/
> 
> 
> Testing
> -------
> 
> make check.
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>

Reply via email to