Home > Software engineering >  A large number of data mapping, how to improve the speed!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
A large number of data mapping, how to improve the speed!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Time:10-08

Millions of points in the array, line drawing, to zoom, zoom, how can you improve the drawing speed??????? For conventional resolution of curve shows that when the pixel points more than resolution, there are a lot of curve points are completely unable to express, if all mapped will slowly, can you take a large number of data points feature points in the paint, the principle is not affect the general form of the curve as far as possible, how to implement? Premise is not influence my amplification, narrow curve function!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Had better have the exact code thank you

CodePudding user response:

Only in memory operation is the fastest, as for the millions of points, I didn't dare to think of what it will be, but I can give you a memory mapping to explicitly on the big picture, for example, may be helpful to you:
http://download.csdn.net/detail/veron_04/2368159

CodePudding user response:

Vb draw millions of points also has more than ten seconds, but the millions of points in the curve of the crowded there was what features in one screen at a time, into a surface,
Each drawing should be painted window can display only points, which is no more than window ScaleWidth, as to zoom in, simply change the value ScaleWidth, needn't you deal with.

CodePudding user response:

1. A large increase of CPU and GPU auditing;
2. A large number of additional memory and memory on the number of G.

CodePudding user response:

In addition, when want to zoom in and out does not affect image quality, have to vector graphics.

CodePudding user response:

, according to the classification, according to the narrow details don't zoom in the local details

CodePudding user response:

Which master can say specific point? Had better have the code, thank you.
Data such as
Time (hours) temperature
0.00027778 16.381
0.00055556 17.488
0.00083333 19.560
0.00111111 25.624
0.00138889 36.682
0.00166667 23.740
0.00194444 16.797
.
One million lines in the text, how to improve the speed, draw the screen resolution is limited, there must be a lot of repeated points, how to painting not only repeat points, so that you can not change the configuration of graphics, but how to implement and fast to risk

CodePudding user response:

So large amount of data, characteristic data is the key, rather than the whole picture.

According to the LS to data, I should consider to do so.
About 1 second one data, so first consider the division of abscissa, abscissa in 1 minute. Ten little is every six data average point.
Painted with about 1000 small is 100 minutes of a data graph, basic can coherent rise, and real data.

If afraid of data distortion, can join the zoom function. All in all, before drawing automatically calculate the points need to redraw the screen, and then evaluated draw points, than all the painted on high speed, a sex strong,

Ls said to the other data from the text, there is some trouble to handle, less convenient database,

CodePudding user response:

I am a beginner, I hope you teach, take characteristics data is best what is the fastest algorithm, thanks? Write to me yourself in more detail

CodePudding user response:

Can be divided into several segments such as data according to the time (number must be less than can display points), each paragraph take its average (or median) as the representative of the segment (features, without extremum, because there will be a lot of extremum in a), draw curve, which can keep basic graphic feature, you don't need to struggle with the top or bottom graphic will appear some time, think about the top or bottom from millions of points who can find? Even want to see more details can be obtained by magnifying the graphics,

Graphic enlarge and narrow: drawn by the above method, only need to change the length of the segment (such as to an hour a day, one second to ten minutes) graphic amplification can be realized with narrow,

CodePudding user response:

I want to come to feature points according to the size of the temperature data and how to achieve this? What is the good method? Thank you for your advice

CodePudding user response:

I think the building as a beginners don't plug too many things at once.
Or go back and achieve the goal of the initial first:
Suppose your Picture control width is 1000 pixels, how to the most efficient to millions of data Dallas?
In fact you also see out, so the dense data, even no connection between point and point is irrelevant.
And you must also found, to put all data painted is meaningless.
So what's left is how to select data.

The VB and C, the relationship is not large, is pure mathematics or thinking.
So I can work on it ourselves.

CodePudding user response:

11 references phghbcs8888 response:
I want to come to feature points according to the size of the temperature data and how to achieve this? What is the good method? Thank you for your comment


As for "feature points", you put any stock for one year change curve of the pressure to a screen, can also tell from above "characteristics" of every day? What's more, your data compression ratio is greater than this.

Other people's thinking is not suitable for your problem, or a pony across the river.

CodePudding user response:

I want to use bitmap method to realize the duplicate data don't show, how to implement, please advice

CodePudding user response:

On the 14th floor phghbcs8888
reference response:
I want to use bitmap method to realize the duplicate data don't show, and how to implement, risk

You don't want to get a little too much, also is a curve, make so complicated,
1, write a memory DC bitmap is only in the case of the machine performance does not meet to consider, important algorithms, or write directly screen will not be fast,
2, about the features, is just a relative concept, take your temperature data, if the acquisition time, a minute is characteristic of the data is just one minute, if once a day, then the data is characteristic of a day, the temperature and time itself is a continuous function, you collected data intervals are still small, but and does not represent is the curve of temperature change , is only an approximation, so your data is the temperature curve of "characteristics", what features you want? In the same way, you put the existing data any isometric part out , or over a period of time of multiple data average, median, etc., can be as "characteristics", (note: junior middle school mathematics statistics: mean, median, mode can be as a representative of the data of )
3, duplicate data don't show, there are "duplicate data in the data itself is a characteristic of data, you don't, don't lost this feature? If it should be said that over a period of duplicate data is more, then you can take this paragraph of time the number just as this period of time "characteristics",

Finally, the human eye can see the most can't more than the width of the screen, most are YiLiangQianGe point, use efficiency is the slowest PSet to draw is enough, you have to do, is to draw every time when these points are selected,

CodePudding user response:

The
reference 7 floor phghbcs8888 response:
which master can say specific point? Had better have the code, thank you.
Data such as
Time (hours) temperature
0.00027778 16.381
0.00055556 17.488
0.00083333 19.560
0.00111111 25.624
0.00138889 36.682
0.00166667 23.740
0.001944...

The simplest way:

Define A value to A, this value represents the physics on the most can show the number of temperature points, such as 1000, more than the value indicated that the adjacent points already in physics are the same pixel, again according to be meaningless, waste hardware resources such as CPU and memory.

And then drawing, will certainly have a display area, is all data display, data or display only certain days.

Display area is determined, you can get the number within the scope of the original data, it is assumed that you want to display all the data, is from 0 to 1000000.

So, because most physics surface can only display A temperature point, therefore only need every 1000000/(1000000 - A) to take A temperature point displayed.

So, whenever A temperature only A point in the show, no matter how also won't slow.

CodePudding user response:

If I am a larger variations, transient gas temperature data from 15 to 120, and from 120 to 30, so how to how many points to take every can missed the feature points, can't see this a few points on the curve of the fluctuations, still have to find curve feature points, thank you, which ace to give directions, there is a better algorithm, is the scope of my drawing all data is displayed. Please expert advice

CodePudding user response:

You can do some test, do not consider efficiency

1, all painted
2, every picture of a
3, every five by drawing a
4, every 10 by drawing a

What is the difference between first take a look at these, you have a clear understanding of the

Then you can make a few interval analysis to these data, if you are drawing unit twip almost 15 twip=1 pixel, two points before and after you can see if a difference of less than 5 would be removed?

CodePudding user response:

If I a larger variations, transient gas temperature data from 15 to 120, and from 120 to 30, so if every time a little will missed the feature points, can't see this a few points on the curve of the fluctuations, still have to find curve feature points ah, thank you, which ace to give directions, there is a better algorithm, is the scope of my drawing all data is displayed. Please advicenullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related