Quantcast

C# HDF.PInvoke performance problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

C# HDF.PInvoke performance problem

Johan Ferguson-2

Dear support,

 

I am currently sitting with a performance problem reading data from an HDF. I have currently

Over 2mil cells in one file, but it takes about 5 seconds to read the information. Is there a way

Where reading data from C# HDF.PInvoke can be optimized ?

 

I have attached my Code

 

Regards

 

Johan Ferguson


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Program.cs (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C# HDF.PInvoke performance problem

Gerd Heber

Johan, how are you? I’m not sure I understand what you trying to achieve

here. Presumably you are reading a dataset (2D) of single precision

floating point numbers. What’s the layout of the dataset?

 

Have you timed the H5D.read call on line 116? How long does that take?

(Unless the layout of your data is “strange”, e.g., chunked with

one element per chunk, this should be fast, except you are reading

off a floppy disk ;-)

 

Then you are looping (lines 121-128) over the float array and read the

elements byte by byte. (?) Maybe that’s the long pole in the tent (in your timing)?

 

G.

 

From: Hdf-forum [mailto:[hidden email]] On Behalf Of Johan Ferguson
Sent: Tuesday, March 07, 2017 1:28 AM
To: [hidden email]
Cc: HDF Helpdesk <[hidden email]>
Subject: [Hdf-forum] C# HDF.PInvoke performance problem

 

Dear support,

 

I am currently sitting with a performance problem reading data from an HDF. I have currently

Over 2mil cells in one file, but it takes about 5 seconds to read the information. Is there a way

Where reading data from C# HDF.PInvoke can be optimized ?

 

I have attached my Code

 

Regards

 

Johan Ferguson


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Loading...