+ Reply to Thread
Results 1 to 5 of 5

Speed and Memory Problems using Pictures

  1. #1
    Registered User
    Join Date
    09-25-2008
    Location
    Winnetka, CA
    Posts
    83

    Speed and Memory Problems using Pictures

    I have a set of macros that makes a list of image files from the network drive, and can display thumbnail versions of each image. Not surprisingly, it seems to be using a lot of RAM and sometimes bogs down.

    In the macros, I've done a lot of the basic speed/memory optimization: avoiding loops, calling Functions once instead of multiple times, using "With <object>" blocks, and using "Set <object> = Nothing" when the object is no longer needed. That has all helped, but the spreadsheet itself seems to be slow.

    When I scroll up and down, each thumbnail takes a full second to appear. My coworker says that when he swaps away from Excel -- into Outlook, for instance -- and swaps back, the spreadsheet is slow to reappear. (He says the CPU cylcles peak while this is happening.)

    Are there any tricks to handling multiple images that would make it go faster and use less memory/CPU? Can I import the pictures "compressed" or something? Would it be faster if I displayed only the pictures that are in visible cells, and when I scroll, replaced them with the next screenful?


    Thanks.
    Last edited by shawnvw; 07-21-2014 at 08:57 PM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Speed and Memory Problems using Pictures

    Have you tried resizing the original images to shrink their file sizes before loading them into Excel?
    Does it make sense to create thumbnails images for each original, loading them into Excel and linking them to the larger images?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    09-25-2008
    Location
    Winnetka, CA
    Posts
    83

    Re: Speed and Memory Problems using Pictures

    Quote Originally Posted by Ron Coderre View Post
    Have you tried resizing the original images to shrink their file sizes before loading them into Excel?
    I have not. Is it possible to do that on the fly? That is, when I select a picture file from the table, can a macro resize the picture (and save it as a new, smaller file) while still in Excel?

    Does it make sense to create thumbnails images for each original, loading them into Excel and linking them to the larger images?
    That might work. Is there some kind of utility (outside of Excel) that can make thumbnails of all the files in a folder?

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Speed and Memory Problems using Pictures

    1) I believe you'd need to edit the images and resize them. Excel "resizes" by changing the magnification.
    2) There might be a utility that will cycle through folder images, resizing them. I never searched for one. :\

  5. #5
    Registered User
    Join Date
    09-25-2008
    Location
    Winnetka, CA
    Posts
    83

    Re: Speed and Memory Problems using Pictures

    It looks like http://www.IrfanView.com can do batch conversions, so I"ll try that. Thanks for pointing me in that direction.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Basic file, no pictures, no formulas, huge memory and cpu usage
    By neowok in forum Excel General
    Replies: 4
    Last Post: 12-10-2013, 12:47 PM
  2. Optimizing memory, speed: Arrays vs. Cells, etc...
    By T_o_n_y in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-02-2006, 04:15 PM
  3. Repost: Speed of inserting pictures and Excel memory
    By Greg Wilson in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-16-2005, 05:05 AM
  4. [SOLVED] Excel memory and speed when inserting pictures ???
    By Greg Wilson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2005, 04:05 AM
  5. [SOLVED] Memory Leak Excel 2003 vs 2000 using linked pictures
    By Scriptick in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-27-2005, 12:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1