Delays opening documents "http://host/document.doc"

G

Gemma M

The VBScript below times how long it takes to run Word, and open a document.

The first time it runs, following power-on or system restart, it takes an
order of magnitude longer to open the document than all subsequent runs. I
have tried it on three machines. One took 15 seconds to open the document
first time around, and then half a second for all subsequent runs. One too
12 seconds for initial opening, and 1.5 seconds thereafter, and my own
desk-top too 9 seconds for the first opening, and half a second
subsequently.

My question is : why so long for the initial document opening? Or in other
words, what is it doing first time that it isn't doing all subsequent times?
Is it possible for me to trigger whatever the initial document opening is
doing, without actually opening a document (in other words "hide" whatever
is happening in the first document opening in the login process)?

Also ... Is there a WEB site or book that will give me some background to
the mechanism being employed to access the document?

Gem

---------------------------------------------
Dim w
Dim d
Dim logger
Dim n
Dim m1
Dim m2

n = Now

MsgBox "Go!"

m1 = Timer

Set logger = CreateObject("XSyslog.Syslog")

Set w = CreateObject("Word.Application.9")
w.Visible = True

Set d =
w.Documents.Open("http://LocalHost/TestWeb/documents/documents/test.doc")

m2 = Timer
logger.PostMessage "Close : " & CStr(m2 - m1), 6, "Main"

d.Close

w.Quit

Set logger = Nothing
Set d = Nothing
Set w = Nothing
 
S

Sean

I'm no expert on Word, but I'd assume that the first time it's having to
load Word and the document from the harddisk, whereas on subsequent openings
much of it is cached in memory.

On a rebooted system try opening a different document, close Word and then
run your test again. You should see it opening a lot faster than on a
freshly booted system.

There used to be a program installed by MSOffice, I think it was called
QuickStart.exe. A shortcut to it was placed in the Windows startup folder. I
think its purpose was to pre-cache a lot of the MSOffice stuff, so that
you'd think that Office was nice and quick, even though Windows had suddenly
started booting more slowly for some reason...

I don't know if something similar still exists, though I'm sure you could
put something together yourself to accomplish the same thing pretty easily.
If we're talking VBA then perhaps you could put a shortcut to a Word doc in
the startup folder, set to start minimised, and the document contains an
autorun macro that closes it down.

I'm a VB guy rather than VBA, but that seems feasible to me. Don't think I'd
bother personally, people will probably be used to Word taking a while the
first time they use it.

Sean
 
G

Gemma M

I already tried the start-and-close Word, and then run the script. It makes
very little difference. I'm pretty sure the delay first time around is to
do with the client establishing a session with the server (even though the
two are on the same machine, it still takes what I would consider an age).
However, running IISRESET to reset the Internet server makes little
difference too. Which means there is a mystery component or task or
activity which is launched the first time Word accesses a document on the
Internet server, which leaves no trace in the "Processes" list of Task
Manager, and which is not killed by resetting the Internet server.

It's a mystery delay, that I cannot track down to a component that can be
kick-started. If anyone else has any ideas, I'm all ears.

Gem

PS. Word 2000 is marginally faster than Word 2003.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top