HistomicsTK icon indicating copy to clipboard operation
HistomicsTK copied to clipboard

fix: redundant writes to dataframe #1105

Open X-TRON404 opened this issue 1 year ago • 1 comments

I have submitted a pull request to address issue #1105. This entails first establishing a data structure, making modifications to it, and then generating a dataframe—all in a single instance.

X-TRON404 avatar Mar 23 '24 22:03 X-TRON404

I've made an update to the section of the code where we initially create the features DataFrame and then modify it by accessing its elements repeatedly. In the improved version, I'm now constructing the features using a native Python data structure first, and then transferring these features to the DataFrame in a single operation. This change has resulted in a performance increase of up to ~75%.

X-TRON404 avatar Apr 03 '24 20:04 X-TRON404