Notes.ini Entry



Name:

    Editor_Memory_Scale

Syntax

    Editor_Memory_Scale=Value

Applies to:

    Workstations

Add-on:


    First Release:

      7.0.3

    Obsolete since:


      Category:

        RichText

      Default:

        None

      UI equivalent:

        None

      Description:
      When a user attempts to open a document that contains numerous body fields (e.g., 40+ body fields), it takes a long time for the document to open, and in some cases, the document does not open and the following error is generated:

      "Document has too many paragraphs - it must be split into several documents."

      Note: In some releases the above error may be preceded by either of the following multiple times:

      "Type mismatch on external name: UIMEMODOCUMENT"
      "Variant does not contain an object"
      "Illegal Circular USE: CheckQuotas"

      In the Notes 5.x releases this issue was fixed in Notes 5.0.1, relative to SPR# JKEY46WKV3. This issue was reported to Quality Engineering as SPR# PHEE5HE7AY and has been fixed in Notes 6.5.6 and 8.0, by the introduction of a notes.ini parameter which can be used to adjust memory usage so that a document will load. Note: Use of the parameter impacts client performance and it is not advisable to use it with larger settings on a full time basis. This fix is also under investigation for Notes 7.0.3.

      The new notes.ini parameter EDITOR_MEMORY_SCALE can be given a value from 20 to 200 (for example, EDITOR_MEMORY_SCALE=200). A setting of 50 will use half the normal memory per document. This will increase performance, but larger documents may not load. A setting of 200 will use twice the amount of memory per document, and will slow performance, but will allow you to open a document returning the "Document has too many paragraphs..." error.

      The recommended usage of this parameter is to use it with a value of 200, to retrieve the content from problematic documents. The document content should then be pasted into one or more other documents for easier access, and then the parameter should be removed or set to 100.

      Note: Even when the parameter is in use, prior to the document opening, some of the secondary errors may appear numerous times. This is not unexpected.

      Workaround

      If possible, use a Notes 5.x client to edit the document. Note: It may take longer than expected to open the document. If the database is local and uses an On Disk Structure (ODS) of 43 then place a operating system copy of the database on a Domino 6.x or 7.x server and access the database from the server.

      In some cases, for example where the relative Rich Text field contains an unexpected amount of blank lines, a LotusScript agent may be useful in creating a copy of the document where only the plain text (and optionally the attachments) from the Rich Text field is copied.

      The below script demonstrates a basic approach that can be used to copy the following information from a selected document into a new document:

      - All of the fields from the original document.

      - Any plain text from the specified Rich Text field.

      - Any attachments from the previously specified Rich Text field.

      The agent is designed to act on only the currently selected document. If encryption is in use then the ID (or Private key) used to encrypt the document must be used when executing the agent.

      Note: IBM Support is not available to further customize the example for specific customer applications.

             Dim s As New notessession
            Dim doc As notesdocument
            Dim temp As notesdocument
            Dim rtitem As notesrichtextitem
            Dim rtf As string                                                                    

           'Specify the Rich Text field name in the line below:
            rtf="Body"
            Set db=s.currentdatabase
            Set doc=s.DocumentContext
            Set rtitem=doc.getfirstitem(rtf)
            Set temp=db.createdocument
            Call doc.CopyAllItems(temp)
            Call temp.RemoveItem(rtf)
            Dim rttemp As New notesrichtextitem(temp, rtf)
            Call rttemp.Appendtext(rtitem.text)
            If Isarray(rtitem.embeddedobjects) Then
               Forall o In rtitem.embeddedobjects
                  If o.type=EMBED_ATTACHMENT Then
                     Call o.extractfile("C:\" + o.source)
                     Call rttemp.embedobject(Embed_Attachment, "", "C:\" + o.source)
                     Kill "C:\" + o.source
                  End If
               End Forall
            End If
            Call temp.save(True, True)