lasio icon indicating copy to clipboard operation
lasio copied to clipboard

Slow performance for LAS 3 files which do not use "_Data" for data section headings

Open LouisLvx opened this issue 4 months ago • 0 comments

Describe the bug For some big LAS 3 files reading is very long. This is due to the regex in lasio/reader.py that searches "_Data" in the section title but in my example the section is "XXX_DATA". Btw by using this regex it is very fast. Could you implement it ?

[...]
elif re.search("_data", stitle.lower()):
        return "Las3_Data"
[...]

To Reproduce I cannot provide my files for confidential reasons but : Take a las file:

  • with YOURKEY_DATA delimiter for data section
  • large amount of data (10k+ lines)

You will see that atm it takes a lot of time.

Expected behavior Reading should last only a few seconds

Software versions (please complete the following information):

  • Python version: 3.10
  • Python distribution: conda
  • lasio version: 0.31

Additional context

LouisLvx avatar Feb 28 '24 15:02 LouisLvx