Answer the question
In order to leave comments, you need to log in
How to increase the performance of a .net 4.5 program using 50,000 database queries?
Task: write a program that counts a lot of different statistics, about 50,000 database queries in a particularly perverted form and displays them for viewing in the program itself using the FlowDocumentReader in the form of tables.
Workstation configuration: Intel core i5 2.4 GHz, 8 GB RAM, 256 GB SSD (60 free). I am using MS SQLServer Express 2012, Windows 10 pro, the program itself is in .net 4.5 WPF.
When the first hundred requests were formed, the brakes began - on ssd the result of the request is executed for about 5 seconds (it used to be 1 second), I think it will get worse further. Here is the code for generating each line:
// Строка 8.2
this.FormN.RowGroups[0].Rows.Add(new TableRow());
this.FormN.RowGroups[0].Rows[70].FontSize = 14;
this.FormN.RowGroups[0].Rows[70].Cells.Add(new TableCell(new Paragraph(new Run(""))));
this.FormN.RowGroups[0].Rows[70].Cells.Add(new TableCell(new Paragraph(new Run("8.2"))));
this.FormN.RowGroups[0].Rows[70].Cells.Add(new TableCell(new Paragraph(new Run("H16"))));
this.FormN.RowGroups[0].Rows[70].Cells.Add(new TableCell(new Paragraph(new Run(CF12.Str8_2_4()))));
this.FormN.RowGroups[0].Rows[70].Cells.Add(new TableCell(new Paragraph(new Run(CF12.Str8_2_5()))));
this.FormN.RowGroups[0].Rows[70].Cells.Add(new TableCell(new Paragraph(new Run(CF12.Str8_2_6()))));
this.FormN.RowGroups[0].Rows[70].Cells.Add(new TableCell(new Paragraph(new Run("8"))));
this.FormN.RowGroups[0].Rows[70].Cells.Add(new TableCell(new Paragraph(new Run("9"))));
this.FormN.RowGroups[0].Rows[70].Cells.Add(new TableCell(new Paragraph(new Run("10"))));
this.FormN.RowGroups[0].Rows[70].Cells.Add(new TableCell(new Paragraph(new Run("11"))));
this.FormN.RowGroups[0].Rows[70].Cells.Add(new TableCell(new Paragraph(new Run("14"))));
this.FormN.RowGroups[0].Rows[70].Cells.Add(new TableCell(new Paragraph(new Run("15"))));
this.FormN.RowGroups[0].Rows[70].Cells.Add(new TableCell(new Paragraph(new Run("16"))));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question