After studying this for a while I think I understand the logic now.
Caching the conversion routine from the last time a request was made on this channel makes sense only if we circumvent the call to dbGet and call the conversion routine directly. This is what the last two cases are about.
I am not sure this optimization buys a lot. The code path inside dbGet up until the point where we call the conversion routine is mostly a small number of binary decisions and a few simple scalar assignments. We don't specify any options to dbGet (the MS link option is handled separately). Saving these few lines of code doesn't strike me as worth the trouble. The only noticeable benefit this could have is that we avoid the table lookup, which /may/ allow the processor to keep the conversion routine in the cache.
Has this ever been benchmarked?
Anyway, I will try to refactor this in my write-filters branch. It should be possible to make this optimization work with less complication by factoring out the code from dbGet up to the point where we know which conversion routine we want to call and then just return that pointer.
--
https://code.launchpad.net/~dirk.zimoch/epics-base/+git/epics-base/+merge/378968
Your team EPICS Core Developers is subscribed to branch epics-base:7.0.
- References:
- [Merge] ~dirk.zimoch/epics-base:dbChannelForDBLinks into epics-base:7.0 Dirk Zimoch via Core-talk
- Navigate by Date:
- Prev:
Re: [Merge] ~dirk.zimoch/epics-base:dbChannelForDBLinks into epics-base:7.0 Ben Franksen via Core-talk
- Next:
Re: [Merge] ~dirk.zimoch/epics-base:dbChannelForDBLinks into epics-base:7.0 Dirk Zimoch via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: [Merge] ~dirk.zimoch/epics-base:dbChannelForDBLinks into epics-base:7.0 Ben Franksen via Core-talk
- Next:
Re: [Merge] ~dirk.zimoch/epics-base:dbChannelForDBLinks into epics-base:7.0 Dirk Zimoch via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
|