pcdshub / pytmc

Generate EPICS IOCs and records from TwinCAT projects - along with many TwinCAT project tools
https://pcdshub.github.io/pytmc/
Other
10 stars 11 forks source link

REF: sort generated records by TwinCAT symbol name (tcname) #293

Closed klauer closed 2 years ago

klauer commented 2 years ago

Closes #292

There's 3 lines of implementation; the remainder is clean-up/annotation:

    def by_tcname(record: RecordPackage):
        return record.tcname

    records.sort(key=by_tcname)

I was wrong about the iterative generation of the records as in #292. Finding chains is an iterative process but generating db files from the pared down record list is not. So, there's no real performance impact here.