MultiscaleImage使用太多内存 [英] MultiscaleImage use too much memory

查看:80
本文介绍了MultiscaleImage使用太多内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

推荐答案

* 40,000 *图片? 我对你使用大量内存并不感到惊讶! 即使是在最小的规模上,你也会看到很多物品的大量内存使用量。每个图像40,000 x但是很多字节很多...

也许您可以使用数据库来存储所有图像引用(以及存储在唯一文件夹中的相关文件位置,以及关键字标记,等)然后在项目中添加(关键字)搜索功能,以便用户可以搜索特定图像并一次加载一个?您的初始视图甚至可以在启动时从您的数据库加载随机的图像采样(尽管是低数字,lol)。无论如何,我没有为你提供具体代码,但我确信可以做到。
*40,000 * images?  I'm not surprised you're using a ton of memory!  Even at the smallest scale, you're looking at a lot of memory usage for that many items. 40,000 x however many bytes per image is a lot...

Maybe you could use a database to store all of the image references (and their associated file locations as stored in unique folders, plus keyword tags, etc) separately and then add a (keyword) search feature into your project so that your users can search for specific images and load them one at a time? Your initial view could even load a random sampling of images (a LOW number though, lol) from your database at startup. Anyway, I don't have specific code for you for any of this, but I'm sure it can be done.


这篇关于MultiscaleImage使用太多内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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