控制台中的大量数据 [英] Console Huge Amount of data

查看:98
本文介绍了控制台中的大量数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的C ++控制台应用程序中有恒定的数据流,我想在控制台上显示此数据.

问题是,由于接收到的数据量巨大,我最终使整个PC变慢,有没有办法我可以解决此问题(双缓冲??),如果可以的话,我可以指出如何进行此操作的示例文章

(我目前正在使用一个简单的cout来输出数据)

Hi,

I have a constant stream of data coming into my c++ console application and i want to display this data on the console.

the problem is that since the amount of data received is huge I end up slowing the whole PC is there a way i can solve this problem (double buffering ??) if so can you point me to an article of example of how this is conducted

(i am currently using a simple cout with output the data)

推荐答案

坏主意,句点!
如果有太多数据正在减慢整个PC的运行速度,您希望用户如何阅读它?
您需要查看汇总数据或以固定页面大小显示数据.

此刻,您正在向输出中添加越来越多的数据,导致越来越多的文本行被滚动,这就是为什么它变慢的原因.
Bad idea, period!
If there is that much data that it is slowing down the whole PC, how do you expect the user to read it?
You need to look at either summarizing the data, or presenting it in a fixed page size.

At the moment, you are just adding more and more data to the output, causing more and more lines of text to be scrolled, which is why it slows down.


尝试看看它通过用户的眼睛:

看到什么?
需要看到什么?

也许所有相关的只是地位问题,每秒更新一次或两次就足够了.

如果用户确实需要能够查看实际数据,则将其转换为既紧凑又在视觉上有意义的内容,例如功能图中的单个点.您可以使用双缓冲每秒两次绘制图形来制作类似于系统性能表的显示.
Try to look at it through the eyes of the user:

What does he want to see?
What does he need to see?

Maybe all that''s relevant is some kid of status, and it might be sufficient to update it once or twice a second.

If the user really needs to be able to see the actual data, then convert it to something that''s both compact and visually meaningful, such as a single dot in a function graph. You could make a display similar to the systems performance meter, using double-buffering to redraw the graph a couple of times per second.


这篇关于控制台中的大量数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆