Skip to main content
    Country/region select      Terms of use
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

Today I have a question from a partner which I'll paraphrase below. I thought my answer might be of general utility, so I'm posting it here.


Our Notes documents include embedded images in rich text. It takes about two seconds to open a document on the LAN, but when accessed over our WAN the time increases to around 90 seconds. How can we make it faster? Can we use a relational database?

The first thing to make sure of, is that you're creating the photos by importing JPEGs, not by pasting images or by importing BMPs. JPEG formats are considerably more compact than Notes pasted bitmaps or BMP files.

Set the INI variable OptimizeImagePasteSize=1 on all users' workstations to make sure that any graphics they do paste, are of a reasonable size. This will affect the color rendering (change to 256-color), so photos will not look the same, but they can bypass this by importing rather than pasting, so it just enforces good habits.

If you're already doing these things, and it's not helping enough: unless this is a professional photography application, you should be able to reduce the image size by using higher JPEG compression, without loss of quality that the users will notice.  The easy way to do this is to just tell the users to limit the file size that they import. You could use DXL to confirm the size limits are met as part of the pre-save validation. A more complicated way would use some software (I'm sure you could get it free) to manipulate a file the user selects and automatically make it fit the file size guidelines, then import it.

If you're storing the images efficiently in Notes, nothing you do with relational databases or file servers or so forth will make a significant difference as long as the same images are being accessed over the same WAN.

So your choices are:

  • reduce the size of the data.
  • make the data available on the LAN or locally (e.g. by creating more replicas of the application).
  • reduce the number of occasions on which the images are retrieved. For instance, make them attachments instead of embedded images, so that they don't affect open time but are only transmitted when a user specifically asks to view them.
BTW If you can get some software to create thumbnails, I have a way to create a file attachment with the thumbnail as the file attachment icon, using LotusScript.

Andre Guirard | 7 August 2009 10:34:23 AM ET | Home, Plymouth, MN, USA | Comments (13)


1) LOL
Nathan T. Freeman | 8/7/2009 11:12:13 AM

"Can we use a relational database?"

I guess Larry Kersten was right. There are a lot of inquisitive idiots.

2) Relational?
Keith Brooks | 8/7/2009 11:38:53 AM

Sure you could, but garbage in, garbage out comes to mind.

Graphics, like attachments have their own issues because text is small to send.

Presuming your pipes are big enough(Domino will take as much as you will give it and NOT complain, no more no less, so use QoS) it should be better than that so my guess is one end has a limited pipe.

There are appliances you can get to enhance the speed but at the cost you might be better served by having a local server replicating the specific db or files.

3) hit return too fast
Keith Brooks | 8/7/2009 11:53:13 AM

Also explain how to use doc links or web url links so the graphic/file could stay in a remote location till needed but the core mail/form gets seen and a decision could be made to get the files.

Caution: This will also stop your Domino directory space from getting filled up too fast :-)

4) LS2J for the thumbnails
Julian Robichaux | 8/7/2009 12:07:14 PM

Regarding the creation of thumbnail images, I've got some LS2J code that does that if you want to join forces...


5) Local replica
Stuart Bogom | 8/7/2009 1:04:20 PM

Depending on the nature of the data, a local replica of the database is another option. No delay for the user when opening documents with images. If it is a database that does not change frequently, there may be minimal replication time. If the end user opens documents repeatedly, you only have to send them over the WAN once.

6) Use a policy too...
Chris Whisonant | 8/7/2009 3:47:51 PM

You can also set the pasted image optimization in a desktop settings document. It's what I recommend customers do. Preferences > Miscellaneous tab at the bottom "Compress images pasted into documents". :)

7) whats the easiest way to add a link to a lan file
Sean Cull | 8/8/2009 3:54:16 AM

What is the easiest way to add a link to a lan file onto a Notes document ?

8) Be careful
Doug Finner | 8/10/2009 9:27:52 AM

We have an app that has always used 'file import' to suck images into an RTF field (even gave the user a button to make it easy).

A few months back, we purchased Integra4Notes and had them generate a cool little profile that allows us to convert a selected set of Notes docs into one Word doc (everything that shares a category is converted to one Word doc).

All of the images looked like crap.

Turns out the way Notes and Word handle RT images is different...

The ONLY way we can get good images out of Notes to Word is to copy the image from some image processing software (Paint works great) and paste it into the RTF; anything else and the image quality suffers badly.

We're at R6.5.2 - no clue if thing change in higher revs.

BTW - commercial here - We're lovin' Integra4Notes...It's making 'all things Reporting' dead bang easy and beating the living crud out of our existing 'export to Excel' stuff.

Sean - it can be as simple as including a network url (file:\\server\path\filename) to something more complex where the file name is computed based on known conditions within the document and calls to launch specific apps for the file.

9) Slow images over a WAN; Slow images over a WAN
Andre Guirard | 8/10/2009 11:58:12 AM

Doug, I don't think there's any excuse for an integration tool failing to convert normal application data -- which imported images are -- into a reasonable representation on the other side. You shouldn't have to use mass amounts of extra storage to make up for a bug in the integration tool.

10) your offer of code for icon display
Paul Gaudion | 8/12/2009 12:37:51 AM

Hi Andre:

RE: BTW If you can get some software to create thumbnails, I have a way to create a file attachment with the thumbnail as the file attachment icon, using LotusScript.

Could you possibly make this code available? I am interested.



11) thumbnails
Dmytro Pastovenskyi | 10/2/2009 4:54:58 AM

Hi Andre:

I have a way to create a file attachment with the thumbnail as the file attachment icon, using LotusScript.

I'm very interested as well


12) Slow images over a WAN
Andre Guirard | 10/2/2009 7:37:35 AM

>> I have a way to create a file attachment with the thumbnail as the file attachment icon, using LotusScript.

> I'm very interested as well

See "LotusScript Gold Collection" at

13) Display images after loading may help with perception
Popein | 1/25/2010 11:14:07 AM

The option "Display images after loading" may help. The images are not going to load faster, but the document will open faster; according to what I can read seems the problem is the document opening is slow, maybe the images are not so critical (don't know your context).

"Display images after loading

The database option "Display images after loading" instructs the Notes client to display all text within a document before displaying any embedded images. When this option is left unchecked, images and text load in the order in which they appear in the document. When there are many images or a slow network connection, the user may experience a significant delay before all text in the document can be read. While the total time to load the document will be the same, enabling this setting provides a perceived performance increase by reducing the time needed to access what in most cases will be the useful data in a document."

 Add a Comment
Comment:  (No HTML - Links will be converted if prefixed http://)
Remember Me?     Cancel

Search this blog 


    About IBM Privacy Contact