Saving Internet Site documents is pretty slow.
The reason for that is in the QuerySave of the $internetSite sub form, searching for a Certifier document corresponding to the Organization item. The code loops through every view entry in the ($Certifiers) view, looking for the correct one without leaving the loop once found!
The ($Certifiers) view has 142 default documents, plus the Domino registered Organization, and perhaps others.
The view is sorted alphabetically, so before my organization (shown as O=MyCompanyName) I have at least 123 entries starting with: C=..., CN=..., EMAIL=... it would be way faster looping the view starting from the bottom and leaving right after the desired document is found.
I modified the code like this, it does the same thing, reading just a few documents though:
Sub Querysave(Source As Notesuidocument, Continue As Variant)
Dim doc As NotesDocument
Dim vc As NotesViewEntryCollection
Dim db As NotesDatabase
Dim doc2 As NotesDocument
Dim view As NotesView
Dim nm As NotesName
Dim ISiteOrg As String
Set doc = Source.Document
If Not doc.GetItemValue("Type")(0) = "WebSite" And Not doc.GetItemValue("Type")(0) = "GlobalWeb" Then
ISiteOrg = Ucase(doc.GetItemValue("ISiteOrg")(0))
Set db = doc.ParentDatabase
Set view = db.GetView("($Certifiers)")
view.AutoUpdate = False
Set doc2 = view.getlastdocument
Continue=False
Do Until doc2 Is Nothing
Set nm = New NotesName(doc2.GetItemValue("IssuedTo")(0))
If ISiteOrg = Ucase(nm.Organization) Then
Continue=True
Exit Do
End If
Set doc2 = view.GetPrevDocument(doc2)
Loop
If Continue = False Then
Msgbox("The Organization field must specify an existing certifier organization name")
End If
End If
End Sub