In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
We talked about the presentation of large list reports, but sometimes they still need to be printed, such as bank statements.
So, should printing be a caching mechanism like rendering?
That won't be necessary. Printing is different from browsing, usually just go through it from beginning to end, there is no need to turn the page. In this way, as long as the streaming data is gradually generated into the print page, the problem of memory overflow will not occur.
However, this practice is still troublesome, especially modern browsers strengthen security control, plug-ins such as applet are often disabled, and printing functions are often not provided directly by report tools, but should be implemented by flash or PDF. Streaming reading can be achieved with flash, but it is not simple, and it will lead to excessive coupling between the plug-in and the background, affecting security; while the PDF method is to generate a document at one time, there is no way to implement this mechanism.
Let's figure out what it's like to print 1 million lines of records.
Assuming that a page of paper can print 50 lines of records (which is too much), 1 million rows of records means 20, 000 pages. With 20,000 pages of continuous printing, how many printers can achieve this target? Do your users really have such a device? 20,000 pages of paper are about 2 meters thick. What printer can put them in? Commercial fast printers only have more than 30 pages a minute, and it takes 7 hours to calculate 20, 000 pages per minute. It is not easy for a mechanical device to work continuously for such a long time.
How much memory is required for 1 million rows of records? A record of 1K is already very large (after all, a page needs to print 50 lines), and 1 million lines is only 1GB of memory. This is not difficult to satisfy the ordinary PC used for printing at the front end.
This is still only 1 million records, if you increase 1 million to 5 million, the memory is still affordable, and the printer is absolutely unbearable. In other words, under the memory capacity of modern computers, there is no problem with printing in full memory, and it is almost impossible to find the need for streaming reading. As a commercial software to be sold repeatedly, there is no need for reporting tools to support this extremely rare or even non-existent application scenario.
The result of this calculation looks a bit absurd, and the reader may find it ridiculous. But this is what really happened when communicating with users. In fact, the number of rows of records called was much larger than 5 million, and the users did not carefully calculate what it meant. After some routine calculations, we will find that, although some users are calling, the printing of large list reports is actually a pseudo-requirement.
There is something similar in big data's field, for example, 10T data wants to return the result in 3 seconds, but users will not think that this is likely to mean 10, 000 hard drives.
If you are more serious, you will draw a lot of unexpected and interesting conclusions:).
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.