File Access Speed

  • Hallo,
    Following function calls are used to get the file version information in my code:
    1. GetFileVersionInfoSize
    2. GetFileVersionInfo
    3. VerQueryValue

    The first call takes about 2.5 second, the rest two calls run as expected. If the first call is replaced by a fixed number (the function call is commented out), the second call takes about 2.5 second.
    I have also noticed that it takes long time to show the content while opening windows explorer.

    I guess the problem is because of file access speed.

    The problem appears in NetDCU14, but not in NetDCU10.

    I need your help!

    Thanks in advance,

  • Hello,

    when you call "GetFileVersionInfoSize" twice, only the first call takes 2.5s?
    I assume the modul (whiche contains GetFileVersionInfoSize) is loaded on demand, so the time for the first call is load time + execution time. Time for following calls are execution time only. Right?

  • Thank you for your reply.

    if I call "GetFileVersionInfoSize" twice with same file name, only the first one takes about 2.5s. But if I do it with different file name, the second one takes even longer (about 2.8s).

  • Hello,

    this is very strange. I did not expect such a behavior.
    Does the "call" time denpend on the file size?

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hallo,

    Yes, the time consumption varies depending on the file size.
    Both files, which were used in the function call, are about 6MB.
    If the second file is replaced by a small one which has only about 140KB, the second call costs only about 60 ms.