mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jojy Varghese <j...@mesosphere.io>
Subject Re: Review Request 41959: Statically initializing fetcher plugins.
Date Mon, 25 Jan 2016 18:31:23 GMT


> 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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message