Perfomance Query

Discussion in 'ASP .Net' started by ^MisterJingo^, May 30, 2008.

  1. I'm working on a project which contains a web interface file browser.
    Currently the files can be hidden or shown (based upon file name or
    extension type) through a hardcoded series of 'if' and 'switch'
    statements.
    I'm moving this over to an xml file which will be cached and loaded at
    application start and have come up with two possible ways of doing
    this:

    a) Load the file into a datatable and then for each file object found
    in a directory, loop through the datatable to see if that file should
    be shown or hidden.

    b) create a value object dictionary with the key being the file or
    extension name and then a struct, containing things like image (to
    attach to file type) and alt/title text (for the image etc), being
    stored along with the key. Then simply feeding each name of file
    object into the Dictionary and pulling out the corresponding struct
    and relevant information.

    Which of these would be best performance wise? The first would
    generate large amounts of looping, and the second would perhaps have a
    performance hit from converting the objects in the dictionary back to
    structs.

    Or is there a better way of doing this?
     
    ^MisterJingo^, May 30, 2008
    #1
    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. Gnanaprakash Rathinam

    CreateInstranceAndUnwrap slow perfomance

    Gnanaprakash Rathinam, Dec 29, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    2,139
    David Levine
    Dec 30, 2004
  2. Fredrik Melin

    Server perfomance

    Fredrik Melin, Oct 27, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    417
    Paul Glavich [MVP - ASP.NET]
    Oct 27, 2004
  3. Scott Reynolds

    data perfomance?

    Scott Reynolds, Mar 1, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    429
    Karl Seguin
    Mar 1, 2005
  4. George

    Huge HTML output perfomance

    George, Mar 28, 2005, in forum: ASP .Net
    Replies:
    10
    Views:
    680
    Robbe Morris [C# MVP]
    Mar 29, 2005
  5. James T.

    Perfomance test

    James T., Feb 26, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    412
    James T.
    Feb 26, 2006
Loading...

Share This Page