2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020 2021 2022 2023 2024 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: EPICS 7.0.2.1 release preparation |
From: | "Johnson, Andrew N. via Core-talk" <[email protected]> |
To: | Dirk Zimoch <[email protected]>, "[email protected]" <[email protected]> |
Date: | Tue, 7 May 2019 17:58:52 +0000 |
Hi Dirk, On 5/7/19 4:37 AM, Dirk Zimoch via Core-talk wrote:
I finally found some time to come back to the 'dbll' code. You described the new link methods, but I still have a question.You should only pass those link routines a pointer to a link field. However the IOC has a list of the link fields in each record type and two routines dbGetNLinks() and dbGetLinkField() in dbStaticLib to get to those fields. If you look at the code for dbReportDeviceConfig() you'll see them being used. 2. Also you mentioned the new "faster" way to get the links:Your current code iterates through every field (up to 269 depending on the record type) of every record instance in the IOC database, and for every link field (DB or CA) it performs a record-name lookup on the PV name in that link (which requires calculating a hash of the name and checking the names in that hash bucket, which may have several records in it so does several string comparisons, most of which are going to fail). If you use the new BKLNK field in the record you will still have to look through every record instance, but for each record you immediately know how many DB links point back to this record, which in most cases will be a small number or 0. Now this doesn't give you CA links, and the order in which you will get results is going to be different because your primary scan is now by link target instead of by link source, but the work required to scan the list will be significantly reduced. Look at dbLock.c for how Michael uses bklnk and dbDbLink.c for how it gets populated. HTH, - Andrew -- Complexity comes for free, Simplicity you have to work for. |