TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

High load when converting between filetypes on Ubuntu

1 点作者 fatalerrorx3超过 13 年前
I have a PHP script that uses the command line "convert" utility in Ubuntu to create a thumbnail of a PDF..When a user logs in to the web app they see about 10-15 PDF files in their folder, and on hovering over the file they see a preview of the file. This hover calls the command line to generate the thumbnail and store it in the database for that file, but if the user hovers quickly over all of them in a row one-after-another, I notice the load on the server goes sky-high.. a single user can cause the load reading to spike to over 1.5, is this the only way of creating thumbnails of PDFs, anyone have any other ideas, or is there a way of fine-tuning the convert process, by maybe somehow limiting the resources the convert utility uses?<p>The problem is that generating a thumbnail on an 8MB-10MB PDF already takes about 5-6 seconds to generate and my boss thinks it's too slow, so slowing it down even more would probably not go over to well, is there a better/faster way of doing this conversion? The thing I like about convert is that it works on a lot of different formats, and I think you can install extensions for even more.<p>I was thinking maybe the webkit package (forgot the name of it though), I used it once before to take screenshots of websites, but I don't think it would work on different file types, the majority of the files will be PDF/HTML, and eventually picture filetypes and video file types<p>Any suggestions?

暂无评论

暂无评论