Link to home
Start Free TrialLog in
Avatar of RanjeetRain
RanjeetRain

asked on

Which is better?

Set Doc = ViewEntry.Document

or

Set Doc = DB.GetDocumentByUNID(ViewEntry.ColumnValues(0))


The first column has the unique ID of the document. I will need to update the document and save it.
SOLUTION
Avatar of p_partha
p_partha

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RanjeetRain
RanjeetRain

ASKER

Kinda I also think like that. But could it be the other way round? Lets hear what others have to say. These small small things can add upto a big saving on the performance in routines that run for long durations.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, but you need to create a notesview object first , and this is very expensive performancewise.  So if you only need 1 document, getdocumentbyunid is certainly faster, because you don't need to create the notesview object

cheers,

Tom
Yes, but Ranjeet used a ViewEntry in both cases. So it's already there, implicitely... :-D
Good good. Nice to have more views and finding how much you agree or differ with others :D

Thanks. So, the verdict is, use navigation thru the view entry as repetitive calls to GetDocumentByUNID wont be much efficient. Right?

Now now. Do you huys want points too :D
Ranjeet,
Also give the environment where u are goign to use it, if you say schedule agent or a notes client agent, i might not bother very much about performance. If it is a web agent, then we have to look at it in a different perspective altogether

Partha

(Btw, if sjef gets points for this Q, then i also need points :))

Ok Partha, Go ahead and tell me. It isn't bad to know anything.

I discarded the environment on purpose. Long questions can be read differently. Shorter the question lesser the chances of people emphasizing on the wrong spot.

PS: Okay. I conclude you dont want points for this as Sjef isn't opting for. Well, that leaves two contenders for the points. Hmmm...
Who says I'm not opting?? Partha and I, we invested a grand total of 4 cents in this question, so we deserve to get our fair share. And, since nobody else invested anything, who are the contenders? I say...

But, as usual, too small a description leaves too many open options. I assumed there is a ViewEntry available, as Partha did, but you never confirmed our assumption. What's the verdict anyway, what do YOU think?

Sjef ;)

PS There should be a Db.CallThisProcedureOnEveryDocumentThatMatchesThisQuery method. Swiftest on earth.
Is there any online resource that documents the inner deep architecture of the Lotus Notes system?

It seems that we need it a lot!! There should be no secret about how to answer the RanjeetRain's question...

I would conclude - most people are of opinion that while GetDocumentByUNID is a faster method, it may or may not offer the same benefit if called repetitively.

Okay, lets count the votes. Pls vote in Yes or No if my conclusion matches yours.

Sjef, I thought you concluded correctly that a ViewEntry is present in both the cases. Now c'mon, don't say that i need to explain each and everything to likes of you, like saying "yes please" or "hell no" for everything. When are you going to decide to grow up?

Okay, Partha was about to share how it differes in case of a Notes Client agent Vs Web Client agent Vs Scheduled agent. I am all ears. Are you?

Meantime, in my testings, an agent is able to export to Excel a view with about a dozen columns selecting 4500 documents with an activity log in about 130-135 seconds. There isn't much difference bw the time taken when it runs locally as a manual agent and when it runs on a server as scheduled. Is this okay? Or can it be tweaked further?

RAPUTA, if anything, Sjef will not agree to that. Why not post many questions and give him more opportunity to earn points? I would love what you want, but Sjef will not give the link, bet with me.
Is a decision required to start growing up? Great. I'll never grow up, if it's up to me. If you see what all the grown-up people in the world are doing to each other... I don't want to be part of that.

And about the on-line resource: qwaletee seems to qualify. What he knows about the internals of Notes is considerable. I'd love to have some serious Notes documentation as well, it just isn't there if you haven't been there. Proprietary, I assume. If I had the link, would I share it? If I say I don't have that link or documentation, would you believe me?

By the way, did you test your agent for both cases with 1000, 2000, 3000 etc documents? The effects that are not document related must be eliminated from your timing results. Maybe, just maybe, I'll build a test agent over here, to see what the results are.
Did you check out your profiles? Use new look (vs old look) and click on a certificate u have :)

OR see this: https://www.experts-exchange.com/certificate.jsp?taid=133
Qwaletee is a good resource to have. Now someone who has his phone number pls call him and ask to participate here.. lol. Seriously, his knowledge of Domino is admirable. I guess he has not been here much these days.

Good to know you intend to do some testing. I am doing too. Lets post our results. This may just turn out to be an official benchmark of domino's performance ;)
Ranjeet
How do i see the oldlook for the certificate. Doesn't seem to work..

Partha
It doesn't work on old look Partha. Just click the link I posted and you are there. To see other certs that you have replace the TA prog ID.

Oh, btw, I am still awaiting more of your comments.
Ranjeet,
May be i can send u a email, it's more of a coding practice rather than a explanation.

Partha
Sure send. You need my permission to send me a mail or what?

But if you send me a mail don't expect points for them (Sjef is watching).
The certificate is C-O-O-L .  I'm sure I'll print it out and hang over my desk :-)

But seriously, check out the martin scott website, they have a report on Domino performance (several functions compared).  Also in the Performance zone on LDD, there are some documents regarding 'fast' code, although they may be a bit 'low' level for you ...

cheers,

Tom
'low' level... LOL!

Partha: Big Brother (6'5") is watching you...

Sjef ;)
Tom
Even i liked the certificate,but most of them dont come intheir original names here, shdnt there be a option to change the name (or did i miss it !)

Partha
Wouldn't that be great! I'd look for one of the millionaires, open a certificate of my liking and change my name. Splendid.

An option would be to ask the EE guys to use the proper name when you allowed your proper name to be shown to the EE-community. You could switch it on, get and print your profile, and switch it off again.
Okay Tom, I'll check them. Hope to get something to learn.

Sjef? 6'5"!!?!! Are you sure you are not bragging :D


EE people need a kick to get started.

IF FIRST_NAME <> "" AND LAST_NAME <> "" THEN
   DISPLAY_NAME = FIRST_NAME & " " & LAST_NAME
ELSE
   DISPLAY_NAME = USER_ID
END IF


Please post this as an advice in Experts input.
OKay, Partha doesn't want to send me the docs that he said he would. Busy.. huh!!

ANybody wants to add something before i close this?
I rest my case, your honour.
I don't understand what the problem is with forging, won't that information be verifiable on this site anyway?