Replies: 3 comments 13 replies
-
Have you verified that this is the cause of the slow opening? Is the file opening that much slower than your CGIO implementation? Compiling CGNS with
How would lazy loading the file structure help here? I assume that after loading the file, some data is read from the file and the mid-level library expects the file structure to be loaded. Having the full file structure loaded will probably necessitate a large change to the code.
One of the maintainers can correct me, but the intent of the mid-level library isn't necessarily to get better performance, but to provide an interface that helps ensure that files written are CGNS compliant. Obviously the parallel functions are there for performance, but that's targeting single, large file performance rather than performance with very small files. |
Beta Was this translation helpful? Give feedback.
-
Can you share such a file that is giving this performance issues? |
Beta Was this translation helpful? Give feedback.
-
Indeed, but maybe you could add a pre-processing step using ParaView, loading the files (which is fast in PV due to implementation on cgio level), merging blocks using the MergeBlocks filter, then writing back to CGNS prior to starting your processing where now loading with the MLL is performant, especially if your processing is opening the files multiple times. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm currently using CGNS 4.3 and experiment performance issues when calling cg_open. I have some files which takes around 1.5 seconds to open which is way too much for our use case. You might think that this is not that big, but in our specific use case, we can have several thousands of these files to open (such a file is around 90 MB in size). So, going over all the files takes a very long time. What is making things worse is that because of the high number of files, they cannot remain open at the same time, which means that we have to close and reopen them several times, which causes very bad performances.
We actually have some code which is using the low-level CGIO interface to process these files and I wanted to move to the mid-level layer in order to improve performances. There's a lot of searching through the nodes of the different files, which is time consuming. I was expecting the mid-level library to be more efficient (and also would end make our code much more readable) but it turns out that performances are even worse, just by opening the files :(.
Would there be any option to be able to open the files in lazy mode, by loading the data when it is needed? I understand that the data arrays themselves are not loaded (which is understandable) but loading the file structure still takes way too much time.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions