Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

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.
0
RanjeetRain
Asked:
RanjeetRain
  • 10
  • 7
  • 5
  • +4
4 Solutions
 
p_parthaCommented:
As far as i know it's very tough to determine ranjeet,Let's try to interpret this way

db. Getdocumentbyunid is a function call
viewentry.document is a property. Obviously accessing a property value shd be easier than a function call ..

But i have heard cases where it is interpreted like searching a document by unid is always faster

BTW recently sjef was doing some R&D on performance, better to get it from horse's mouth

My 2 cents

Partha
0
 
RanjeetRainAuthor Commented:
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.
0
 
madheeswarCommented:
I agree with Partha.
GetDocumentByUNID is faster.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Bozzie4Commented:
Well , it depends.

If you have a large number of documents to process, then 'walking the view' may (test this) be faster, but if it's just 1 document you need to access, the GetDocumentByUNID is certainly (I'm 100% sure here) faster.
It's the same for @getdocfield against @dblookup : if you need to take only 1 field value from a document, the @getdocfield is waaaay faster than a @dblookup, but if you need more values from the same view/document, you may consider @dblookup (and use caching)


Check http://www.martinscott.com .  They have a performance report to compare several functions in several situations, but you need to be aware that things may change between versions (some functions get performance boosts, other remain the same, so 1 may overtake another in speed from 1 version to the next)



cheers,

Tom
0
 
Sjef BosmanGroupware ConsultantCommented:
Hiiiiiiiiihhiiiiii (that's the horse speaking)

My assumption, because I never looked into this in detail. If you already have the ViewEntry, then getting the document is but one step away. You might have fast access to the ColumnValues property, but access to db and then to the GetDocumentByUnid method, with a parameter, will take a lot longer. I think. But that holds only if you already have the ViewEntry.

My 2 Eurocents...
0
 
Bozzie4Commented:
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
0
 
Sjef BosmanGroupware ConsultantCommented:
Yes, but Ranjeet used a ViewEntry in both cases. So it's already there, implicitely... :-D
0
 
RanjeetRainAuthor Commented:
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
0
 
p_parthaCommented:
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 :))

0
 
RanjeetRainAuthor Commented:
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...
0
 
Sjef BosmanGroupware ConsultantCommented:
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.
0
 
Andrea ErcolinoCommented:
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...

0
 
RanjeetRainAuthor Commented:
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.
0
 
Sjef BosmanGroupware ConsultantCommented:
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.
0
 
RanjeetRainAuthor Commented:
Did you check out your profiles? Use new look (vs old look) and click on a certificate u have :)

OR see this: http://experts-exchange.com/certificate.jsp?taid=133
0
 
RanjeetRainAuthor Commented:
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 ;)
0
 
p_parthaCommented:
Ranjeet
How do i see the oldlook for the certificate. Doesn't seem to work..

Partha
0
 
RanjeetRainAuthor Commented:
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.
0
 
p_parthaCommented:
Ranjeet,
May be i can send u a email, it's more of a coding practice rather than a explanation.

Partha
0
 
RanjeetRainAuthor Commented:
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).
0
 
Bozzie4Commented:
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
0
 
Sjef BosmanGroupware ConsultantCommented:
'low' level... LOL!

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

Sjef ;)
0
 
p_parthaCommented:
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
0
 
Sjef BosmanGroupware ConsultantCommented:
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.
0
 
RanjeetRainAuthor Commented:
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.
0
 
RanjeetRainAuthor Commented:
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?
0
 
Sjef BosmanGroupware ConsultantCommented:
I rest my case, your honour.
0
 
platinumbayCommented:
I don't understand what the problem is with forging, won't that information be verifiable on this site anyway?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 10
  • 7
  • 5
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now