Performance Bottleneck in ASP.NET

Discussion in 'ASP .Net' started by Glenn, Jan 8, 2004.

  1. Glenn

    Glenn Guest

    I have a performance issue that needs resolving, and am
    not sure which options we have come up with are the best.
    Let me explain.

    Our site has a report designer that allows users to create
    dynamic report content. The output for these reports is
    HTML, but they can be exported to a number of formats for
    download (ie Excel). The contents of the exported report
    must be identical to the original report, thus cannot read
    from the DB as data is volatile.

    To overcome this we persist the original HTML report (can
    be exported too), the report options XML document, and the
    dataset used to create the report (XML) to the file
    system. If a user wants to export to another format then
    we load these files and create the necessary report type.

    Having to write to the file system before returning the
    generated report is causing a performance bottleneck when
    the server is under load.

    Here are the options we have come up with:
    * Store the xml options and dataset in session state
    (properties of a wrapper class).
    * Write files asynchronously to file system after the data
    is retrieved from SQL, whilst still continuing report
    generation processing.
    * Is there a better way to structure this? Could caching
    be used here?

    The dataset has the potential to be quite large (up to
    5000 rows in some cases), and will contain multiple data
    tables. This may be a problem for session state usage.

    Haven't use asych processing very much so am a bit
    hesitant to use, but if it is the most efficient solution
    then that's the way I'll move forward.

    Any advice or recommendations here would be greately
    apprecieated...

    Glenn.
    Glenn, Jan 8, 2004
    #1
    1. Advertising

  2. Hi Glenn,

    I wonder if there isn't a way to get a "snapshot" of the data into a unique
    temporary table in SQL Server. That would preserve the contents until the
    user decides what formats in needs.

    You'd have to identify that particular table as the datasource for the
    export format about to be requested, but adding a Session ID field to the
    table might get around that.

    This would offload the slow file system portions onto the database server.

    BTW, I have a process that does write to XML to the file system and then
    processes into PDFs. It also uses XSL Transformations to generate HTML for
    the Web and Excel spreadsheets. It confirm that it certainly can be slow.

    Ken

    "Glenn" <> wrote in message
    news:04f701c3d57c$d45e80d0$...
    >I have a performance issue that needs resolving, and am
    > not sure which options we have come up with are the best.
    > Let me explain.
    >
    > Our site has a report designer that allows users to create
    > dynamic report content. The output for these reports is
    > HTML, but they can be exported to a number of formats for
    > download (ie Excel). The contents of the exported report
    > must be identical to the original report, thus cannot read
    > from the DB as data is volatile.
    >
    > To overcome this we persist the original HTML report (can
    > be exported too), the report options XML document, and the
    > dataset used to create the report (XML) to the file
    > system. If a user wants to export to another format then
    > we load these files and create the necessary report type.
    >
    > Having to write to the file system before returning the
    > generated report is causing a performance bottleneck when
    > the server is under load.
    >
    > Here are the options we have come up with:
    > * Store the xml options and dataset in session state
    > (properties of a wrapper class).
    > * Write files asynchronously to file system after the data
    > is retrieved from SQL, whilst still continuing report
    > generation processing.
    > * Is there a better way to structure this? Could caching
    > be used here?
    >
    > The dataset has the potential to be quite large (up to
    > 5000 rows in some cases), and will contain multiple data
    > tables. This may be a problem for session state usage.
    >
    > Haven't use asych processing very much so am a bit
    > hesitant to use, but if it is the most efficient solution
    > then that's the way I'll move forward.
    >
    > Any advice or recommendations here would be greately
    > apprecieated...
    >
    > Glenn.
    Ken Cox [Microsoft MVP], Jan 8, 2004
    #2
    1. Advertising

  3. Glenn

    Glenn. Guest

    Thanks for that Ken.

    Unfortuately the dataset usually contains cross-tabbed
    data, so the table schema is different for a vast majority
    of instances.

    I had toyed with the idea of creating a report table that
    contained the sessionID, name of a separate report data
    table, and date created. I could then schedule a stored
    proc to run periodically to clean up any "old" report data
    tables.

    If we had a 64 bit server I would just store it using
    InProc session state, but we don't!

    >-----Original Message-----
    >Hi Glenn,
    >
    >I wonder if there isn't a way to get a "snapshot" of the

    data into a unique
    >temporary table in SQL Server. That would preserve the

    contents until the
    >user decides what formats in needs.
    >
    >You'd have to identify that particular table as the

    datasource for the
    >export format about to be requested, but adding a Session

    ID field to the
    >table might get around that.
    >
    >This would offload the slow file system portions onto the

    database server.
    >
    >BTW, I have a process that does write to XML to the file

    system and then
    >processes into PDFs. It also uses XSL Transformations to

    generate HTML for
    >the Web and Excel spreadsheets. It confirm that it

    certainly can be slow.
    >
    >Ken
    >
    >"Glenn" <> wrote in

    message
    >news:04f701c3d57c$d45e80d0$...
    >>I have a performance issue that needs resolving, and am
    >> not sure which options we have come up with are the

    best.
    >> Let me explain.
    >>
    >> Our site has a report designer that allows users to

    create
    >> dynamic report content. The output for these reports is
    >> HTML, but they can be exported to a number of formats

    for
    >> download (ie Excel). The contents of the exported

    report
    >> must be identical to the original report, thus cannot

    read
    >> from the DB as data is volatile.
    >>
    >> To overcome this we persist the original HTML report

    (can
    >> be exported too), the report options XML document, and

    the
    >> dataset used to create the report (XML) to the file
    >> system. If a user wants to export to another format then
    >> we load these files and create the necessary report

    type.
    >>
    >> Having to write to the file system before returning the
    >> generated report is causing a performance bottleneck

    when
    >> the server is under load.
    >>
    >> Here are the options we have come up with:
    >> * Store the xml options and dataset in session state
    >> (properties of a wrapper class).
    >> * Write files asynchronously to file system after the

    data
    >> is retrieved from SQL, whilst still continuing report
    >> generation processing.
    >> * Is there a better way to structure this? Could caching
    >> be used here?
    >>
    >> The dataset has the potential to be quite large (up to
    >> 5000 rows in some cases), and will contain multiple data
    >> tables. This may be a problem for session state usage.
    >>
    >> Haven't use asych processing very much so am a bit
    >> hesitant to use, but if it is the most efficient

    solution
    >> then that's the way I'll move forward.
    >>
    >> Any advice or recommendations here would be greately
    >> apprecieated...
    >>
    >> Glenn.

    >
    >.
    >
    Glenn., Jan 8, 2004
    #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. =?Utf-8?B?bWF0dmRs?=

    Access to remote application and bottleneck

    =?Utf-8?B?bWF0dmRs?=, Jul 10, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    346
    =?Utf-8?B?bWF0dmRs?=
    Jul 10, 2005
  2. David Zimmerman
    Replies:
    1
    Views:
    2,106
    Harald Kirsch
    Jul 22, 2003
  3. Roedy Green
    Replies:
    6
    Views:
    3,277
    Steve Horsley
    Jul 23, 2003
  4. JLM
    Replies:
    2
    Views:
    1,449
  5. Geoff Winsor

    IIS 6.0 bottleneck when serving ASP pages

    Geoff Winsor, Jun 18, 2004, in forum: ASP General
    Replies:
    1
    Views:
    123
    Jeff Cochran
    Jun 18, 2004
Loading...

Share This Page