ReportViewer is causing a second dataset fill() to take several times longer than the first fill() RRS feed

  • Question

  • I traced this issue back to a .rdlc file in a reportviewer used by ASP.NET. I can resolve/cause this issue by removing or readding very basic functionality. A timestamp "=Now()" or parameterized values passed or dynamically changing the color based on value are causing this slow fill() in a seperate dll of the dal. On the next call. Is this some kind of handle that is preventing a Dispose() or something like that? What can I do to resolve this issue? 

    I have tried using both untyped and strongly typed Datasets but am seeing in both cases that performance of adapter.Fill() is several times slower after it has been used the first time. 

     start = DateTime.Now;



    DateTime afterquery = DateTime.Now;

    OracleDataAdapter oda = new OracleDataAdapter(selCmdCost);

    DateTime beforefills = DateTime.Now;

    oda.Fill(resultSet.SalesDetail, (OracleRefCursor)OraDetailCur.Value);

    DateTime afterdetail = DateTime.Now;

    oda.Fill(resultSet.SRG_SALES_DTL_EXPORT_VW, (OracleRefCursor)OraExportCur.Value);

    DateTime afterExportCur = DateTime.Now;

    oda.Fill(resultSet.SRG_GTOTAL, (OracleRefCursor)OraGTotalCur.Value);

    DateTime end = DateTime.Now;

    I have used large result sets:
    first run:
    fill details table:00:00:09.8130024
    fill export table:00:00:01.9219734

    second run:
    Time to return:00:03:49.5898794
    Time to Query:00:00:13.6882008
    Time to fill SalesDetail:00:02:47.0241762
    Time to fill SRG_SALES_DTL_EXPORT_VW:00:00:48.6587412
    Time to fill SRG_GTOTAL:00:00:00.2187612

    Monday, March 9, 2009 4:53 PM