Reflection Version info vs Global Cache performance

Discussion in 'ASP .Net' started by gabe, Oct 27, 2005.

  1. gabe

    gabe Guest

    We use a custom versioning scheme that includes the date and time
    (2.0.10271545). The version number is displayed in a footer user
    control, which is rendered in every page. The web application is in a
    web farm. Would there be a significant performance increase by adding
    it to the global cache object, instead of reading the version info
    every time through reflection for the version that's set in the
    AssemblyInfo file?(Instead of just the first time)

    Since it's on a web farm, I would check that if it didn't exist to read
    it.

    Thanks,

    Gabe
     
    gabe, Oct 27, 2005
    #1
    1. Advertising

  2. It will improve performance, but by how much I do not know.

    Anyway, as a matter of practice, it is usually better to cache information
    that is used a lot but changes little. In the case of the version, the
    version will *never* change simply because if you drop a new assembly
    version, the site will reset itself causing all variables to disappear.

    "gabe" <> wrote in message
    news:...
    > We use a custom versioning scheme that includes the date and time
    > (2.0.10271545). The version number is displayed in a footer user
    > control, which is rendered in every page. The web application is in a
    > web farm. Would there be a significant performance increase by adding
    > it to the global cache object, instead of reading the version info
    > every time through reflection for the version that's set in the
    > AssemblyInfo file?(Instead of just the first time)
    >
    > Since it's on a web farm, I would check that if it didn't exist to read
    > it.
    >
    > Thanks,
    >
    > Gabe
    >
     
    Peter Rilling, Oct 27, 2005
    #2
    1. Advertising

  3. gabe

    gabe Guest

    As test I ran two 10,000 loop iteration tests trying each way. Reading
    the version info using reflection every time was 600 milisecs. Figuring
    the version using reflection for only the initial read and storing it
    in the cache (using refection to get the exectuing assebmly createdate)
    yeilded 40 milisecs, so it was 15 times faster using the cache.

    Thanks for the design tip ---
     
    gabe, Oct 28, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Nokes

    Cache::Cache Stale Segments

    Jeff Nokes, Sep 30, 2003, in forum: Perl
    Replies:
    0
    Views:
    589
    Jeff Nokes
    Sep 30, 2003
  2. Mark
    Replies:
    2
    Views:
    574
    Rick Strahl [MVP]
    Apr 11, 2004
  3. V Green
    Replies:
    0
    Views:
    885
    V Green
    Feb 5, 2008
  4. PA Bear [MS MVP]
    Replies:
    0
    Views:
    1,000
    PA Bear [MS MVP]
    Feb 5, 2008
  5. MowGreen [MVP]
    Replies:
    5
    Views:
    2,042
    PA Bear [MS MVP]
    Feb 9, 2008
Loading...

Share This Page