Parallel development has always been a hurdle encountered by programmers in development projects , But to cater for hardware upgrades , Facing high-end multi-core processors , Parallel programming is imperative . stay .NET The development under the platform supports parallel mode , Here's a real project to illustrate the efficiency and magic of parallelism .
In optimizing the operation and management system of China Railway Construction Enterprises , There is an urgent problem to be solved . It's about the response time of report processing , At the beginning of the system, there was less data , The response time of exporting report is faster . But as the data expands , Export the data of a branch ( Probably 600 strip ) Also needed 5 About minutes , Of course, this is related to the configuration of the computer . If the project report of the head stock company is exported (6000 Bar or so ), That time on the ordinary computer is a long wait . In this , It also takes a long time to export on the high-end configuration server of China Railway Construction Corporation . The system needs to be optimized in report processing , My solution is parallel .
Because the report of the head office is made up of branch offices ( subsidiary ) Report synthesis of , The original programming was based on the serial principle of the program , After completing the report of a subsidiary company , To continue the report operation of the next subsidiary . The head office has about 50 About two sub bureaus and project headquarters , This seriously increases the time of report production and export . Using parallelism , That is to let the original subsidiary company in almost ( This needs to see .NET Parallel operation principle , They still have very small time intervals in parallel ) Processing reports at the same time , Began to run . Put the original need 50 The time period of about one time becomes one time ( It takes the slowest time to start , The last one that ended ). This greatly speeds up the report processing speed . But parallelism is not very well controlled , I tested , It took a long time to solve data sharing , The problem of data conflict .
Of course , Parallel development needs to use the program to call the system's multi-core processor , In this way cpu It's very high in terms of resource utilization , My project is basically cpu Occupation is 100%. It is necessary to accept that space is exchanged for time . however , On the hardware of a real multi-core high-end server , Combined with the improvement of parallel program , The problem of report export time of the head office has finally been solved .
Here are some process shots , It's worth mentioning that the process tracking screenshot of report generation time , It basically reflects the record of parallel program in the process of running .
chart 1 Report export time tracking of head stock company
chart 2 Report export time tracking of a subsidiary company
chart 3 Report export program display
chart 4 export Excel Exhibition
.NET Parallel development under more related articles
- .NET Under the parallel development ( Case code )
The following is mainly through a report processing program to illustrate the way of parallel development . For data conflict and sharing , It can be solved by object array . The core code designed for parallelism is shown in red . In the processing of parallel programs , You need to turn the original serial subsidiary into a class by class object , Let all ...
- [.net Advanced object oriented programming ] (24) Team development tools ( 3、 ... and ) Use SVN Multi branch parallel development ( Next )
[.net Advanced object oriented programming ] (24) Team development tools ( 3、 ... and ) Use SVN Multi branch parallel development ( Next ) Introduction to this article : Let's go on with the introduction SVN Advanced features of , That is, using branch parallel development . As requirements change , The addition of new functions . especially ...
- IPD Summary of some problems in developing agile development under the mode
1. We are now generally using the old system , When to integrate software and hardware into an agile project ? answer : There are two scenarios : The first scenario is to divide the software into several iterations , Finally, integrate the software and hardware together : The second scenario is a better one , Every few iterations ...
- 【 translate 】CEDEC2014 Parallel development across generations and platforms PS4 It's been a year since the reform and development of version Rulong
This article PPT It's about the dragon 4 In the development process , Focused on the PS3 and PS4 Some problems encountered and solved in parallel development . Such as 64 Bit pointer ,DX9 towards DX11 transplant API The problem of , And in PS4 Using parallel rendering on 1080P Give way to FPS achieve 60 etc. . ...
- Concurrent development ——Parallel Use - From the Internet
With the advent of multi-core era , Parallel development is showing its power more and more , Code farmers like us no longer have to pay too much attention to the implementation and manual control of the underlying threads , To understand parallel development , You need to understand the next two concepts :“ Hardware threads ” and “ Software threads ”. 1. Hardware threads ...
- 8 Days play parallel development —— The first day Parallel Use
from :http://www.cnblogs.com/huangxincheng/archive/2012/04/02/2429543.html With the advent of multi-core era , Parallel development is showing its power more and more , image ...
- 8 Days play parallel development —— On the third day plinq Use
original text 8 Days play parallel development —— On the third day plinq Use Believe in .net Under the platform , We've all played linq, Yes ,linq Let's make our program simple and beautiful , I can't put it down , But the traditional linq It's just serial code , In parallel If ...
- 8 Days play parallel development —— Eighth days use VS The performance wizard dissects your program
original text 8 Days play parallel development —— Eighth days use VS The performance wizard dissects your program The last one , Let's talk about vs Of “ Performance wizard ", Usually we debug the performance of the program will generally use Stopwatch, If you want to understand the program more systematically , We need it ...
- Concurrent development -Paraller
The concept of parallel development Parallel development is to allocate tasks to hardware threads for parallel execution to achieve load and acceleration , Traditional code is serial , Just one main thread , When we start a lot of worker threads for acceleration , These worker threads are software threads Paralle ...
Random recommendation
- jenkins Send the package to the remote server
First of all we have Deploy on one server svn,maven,jdk,tomcat,nexus, also Jenkins. Here I mainly record Jenkins. First, we download it from the Internet Jenkins My bag wget http://m ...
- .Net Encryption and decryption in
Overview of encryption and decryption Encryption and decryption belong to the category of data security . In message transmission , By specially encoding messages ( encryption ), Establish a safe way of communicating , So that only the receiver expected by the sender can understand ( Decrypt ). Here we define a scene : The sender , The receiving party , ...
- PowerShell Read Windows Product key
Most people have probably used it before VBS Read Windows Of the product key VBS Script ,VBS Scripts are usually obscure . Difficult to understand , I'm having a break today , I wrote one for reading Windows Of the product key PowerShell Script . The code is as follows : == ...
- Spring And Hibernate Integrate , Realization Hibernate Business management
1. The required jar package Connection pool / Database driver package Hibernate relevant jar Spring Core packages (5 individual ) Spring aop package (4 individual ) spring-orm-3.2.5.RELEASE.jar ...
- ASP.NET Summary of the implementation of page refresh
Have a look first ASP.NET Page refresh implementation method : First of all : private void Button1_Click( object sender, System.EventArgs e ) { Response. ...
- Java Enumeration type understanding
Enum Format understanding Enum The format of can be seen as following class Same keyword class The definition format of is as follows : public class abc{ } enum The definition format of is as follows : Public enum abc { } lead ...
- Cisco CatOS System switch SPAN To configure
Here's an excerpt from the latest “ Four King Kong ” One of the books <Cisco Switch configuration and management complete manual >( The second edition )( The other three books are <Cisco Router configuration and management complete manual >( The second edition ).<H3C Switch ...
- hdu1052 Tian Ji -- The Horse Racing--- Tian Ji is greedy
Topic link : http://acm.hdu.edu.cn/showproblem.php?pid=1052 The main idea of the topic : Tian Ji and the king of Qi had their own N horse , Judge how to play , Make Tian Ji win the most games . Ideas : At first greed went wrong , ...
- [SHOI2008]cactus Cactus picture
[ Title Description ] If any edge of an undirected connected graph appears in at most one simple loop (simple cycle) in , We call this picture immortal picture (cactus). A simple loop is a loop that does not repeat through any vertex on a graph . give an example ...
- obtain html All plain text methods under
The first is to read other people's blogs , The second is discovered by oneself . The first one is : #-*- coding: utf8 -*- import re html = """ <div class=& ...