EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #09138
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Virtual fields -when does the 'cost' of processing get triggered?
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>, John Salter <J.Salter@leeds.ac.uk>
- Subject: Re: [EP-tech] Virtual fields -when does the 'cost' of processing get triggered?
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Thu, 15 Dec 2022 10:57:50 +0000
CAUTION: This e-mail originated outside the University of Southampton.
Hi, For a virtual field, the 'cost' of the field occurs when te value is asked for, not when the EPrint object is instantiated. This is a script I used to investigate: It steps through a few basic questions (archive id, eprintid, field to dump), but also allows you to set the 'noise' of the EPrints session. This is the same mechanism that running e.g. ~/bin/epadmin --verbose --verbose --verbose uses. Setting the noise to 3 will show SQL statements used when creating the EPrint object, or getting a field value. It's not the most useful script as-is, but might be a useful base for other investigations. Cheers, John From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of John Salter via Eprints-tech CAUTION:
This e-mail originated outside the University of Southampton. Hi All, I'm looking adding a 'virtualwithvalue' (https://bazaar.eprints.org/452/1/plugins/EPrints/MetaField/Virtualwithvalue.pm)
field to my EPrints install that does a search of the EPrint history, finding the first record, and returning the datestamp for that history item (i.e. the date the EPrint was created). https://gist.github.com/jesusbagpuss/8b899eb0eb9b2b733eead25c6dfd5973
I was thinking about the processing overhead for this field, and wondered when the value is actually calculated. I guess it's one of these options: If it's the first option, I should add the field to the EPrint dataobj as a non-virtual field, and calculate it once if the value is not set, and then store it. If it's the second option, then the overhead is lower (although I might still want to do the above). I could trace this through the system myself - but thought (hoped) that someone might know…
J Cheers, John John Salter https://orcid.org/0000-0002-8611-8266 White Rose Libraries Technical Officer |
- Follow-Ups:
- Re: [EP-tech] Virtual fields -when does the 'cost' of processing get triggered?
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] Virtual fields -when does the 'cost' of processing get triggered?
- References:
- [EP-tech] Virtual fields -when does the 'cost' of processing get triggered?
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] Virtual fields -when does the 'cost' of processing get triggered?
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Virtual fields -when does the 'cost' of processing get triggered?
- Prev by Date: Re: [EP-tech] permission for "manage records"
- Next by Date: [EP-tech] document.observe is not a function Error in EPrints3.4.4
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):