Template talk:Citation/quick

Created

edit

The Template:Cite_quick was created, by long-term user Wikid77 on 7 August 2012, as a compromise consensus for a fast-citation template in Citation Style 1 (wp:CS1) similar to {cite_web}, after extensive discussions noted that a "lite template" with reduced parameter support should clearly list which parameters are supported, as is done by the documentation page, {Cite_quick/doc}. In fact, the /doc subpage also lists most of the parameters which are not supported, in case there might be any confusion. Although the prior Template:Fcite supports more parameters, it did not list all the supported parameters and was tagged for non-use during a wp:TfD, although there was no consensus to forbid its use, as I as the author specifically did not consent to such an illogical concept of keep-do-not-use, analogous to an article being marked "keep don't read" or some other patent nonsense. Please note that some editors have tried to unilaterally forbid use of this template, even though it meets a compromise consensus after many prior discussions. Wikipedia does not work that way: no single person (without consensus) can properly mark a template "do not use" nor mark an article "do not read" and attempts to do so would likely disqualify that person from consensus discussions, as clearly acting in bad faith to circumvent proper discussions and "lay down the law" to force other editors. -Wikid77 (talk) 00:57, 19 September 2012 (UTC)Reply

Later improvements

edit

Initially, several other parameters had been omitted, until noted that their inclusion would be beneficial, rather than an extra slow-down concern. The following parameters have been added:

  • place - same as "location=" and is commonly used in many articles
  • quote - at the end of the citation, replaces the final dot "."
  • notes - at the end of the citation, also replaces the final dot "."

Again, the support for those parameters does not significantly slow {cite_quick} from formatting 130-190 citations per second. Other improvements are possible, as patterns of parameter usage are analyzed further. The original intent was to support the most-common parameters in {cite_quick}, while running beyond 8x times faster than {cite_web}. -Wikid77 (talk) 00:57, 19 September 2012 (UTC)Reply

Timing compared to Cite_web

edit

In time-tests during September 2012, {cite_quick} continued to run 10x-12x times faster than {cite_web} (with {Citation/core} ), run with the same parameters. While {cite_quick} ranged from 180 to 135 cites per second, {cite_web} ran 18 to 13 per second. When there were fewer parameters selected, then both templates have run nearly 30% faster than with author, title, url, date and accessdate.

  • Case 1: {{cite... |title=My page |url=http: //x.cc |date=1 May 1945 |accessdate=1 June 2012}}
  • {Cite_quick} ran 500 cases in 2.8 seconds
  • {Cite_web} ran 500 cases in 28 seconds
  • Case 2: {{cite... |last=Doe |first=John H. |title=My page |url=http: //x.cc |date=1 May 1945 |accessdate=1 June 2012}}
  • {Cite_quick} ran 500 cases in 3.7 seconds (minimum)
  • {Cite_web} ran 500 cases in 37 seconds

However, there were several times when 500 instances of {cite_web} ran nearly 39 seconds with author last/first names, as 11x slower than {cite_quick}. -Wikid77 (talk) 06:51, 19 September 2012 (UTC)Reply

Now checks last name before author

edit

On 9 October 2012, Template:Cite_quick was changed to check for the use of parameter "last=" before checking "author=" to avoid an empty value in "author=" from overriding "last=xx" as treated as having no author name. The exact precedence order of alias parameters is crucial for duplicating the format of {cite_web} or {cite_book} as they ignore any blank/empty parameters later in the precedence sequence. An example of using empty "author=" after setting "last=xxxx" is article "Bibliography of South America" which uses 5-9 empty parameters per citation, but "last=xxxx" overrides "author=" to avoid a blank author name. -Wikid77 (talk) 09:24, 9 October 2012 (UTC)Reply

Volume

edit

I just tried this template in a new article and noticed that the volume parameter wasn't working. This seems to be because that parameter is dependent upon use of the journal parameter. But in this usage, the source was a multi-volume encyclopedia, not a journal. I'm accustomed to using this parameter for such works when using the {{citation}} template. Should we copy the logic of that or would this slow us down? Anyway, for now, I'll try a workround - putting the volume number in with the page number. Warden (talk) 17:23, 14 October 2012 (UTC)Reply

  • Changed to handle volume/edition for any cite: I have changed {cite_quick} to no longer check for journal name at volume, and instead it uses a gated-if structure which checks directly for {volume|{edition|}}, before checking each separately, and also {issue}. This shows how fast it is, as one gated-if structure:
{{#if:{{{volume|{{{edition|}}} }}}|...then check each...}}
Compare to 3 separate if-structures:
{{#if:{{{volume|}}}|...then show volume...}}
{{#if:{{{issue|}}}|...then show issue...}}
{{#if:{{{edition|}}}|...then show edition...}}
The nested parameters, as {volume|{edition|}}, have a processing speed of 1.3 units, versus the 3 if-structures running 3 units total. In general, an if-structure with 4 nested parameters has a speed of 2 units, so
{{#if: {{{xx1|{{{xx2|{{{xx3|{{{xx4|}}} }}} }}} }}}... ← same speed as 2 if's
Of course, when {{{xx1}}} has been passed into the template, then the condition is instantly true, and the other parameters are not checked further. That use of gated-if structures, rather than all separate one-parameter if-structures is a major reason why {cite_quick} runs so fast, compared to {cite_web}, etc. The speed advantage occurs because the rare parameters, such as volume and edition, are all rejected quickly within one if-structure. When the parameters are very common (instead of rare), then checking each parameter separately would be faster. -Wikid77 (talk) 18:12, 15 October 2012 (UTC)Reply
  • Thanks for making that change. I have tested it and it works as I would expect now. A supplementary point though. The volume number is displayed in an unadorned way, like so:
Perhaps this is a standard convention but, for the general reader, it might be better as:
Why is an abbreviation for volume not used, in the same way that we use "p" or "pp" for the page numbering? Warden (talk) 12:02, 16 October 2012 (UTC)Reply
Solved. See below: "#Changed to allow non-bold volume". -Wikid77 02:13, 17 October 2012 (UTC)Reply

Changed to allow non-bold volume

edit

I have changed to allow "volume=Vol..." to show a non-bolded "Vol. 2". But to non-bold other volume names, then "</b>" can be inserted, as "volume=</b>, 3rd volume". Other editors have also suggested to allow the "vol" format, and for years, we discussed possible new parameters. Now, the bolding is suppressed automatically when using "volume=vol..." as follows:

  • When volume=23:    
  • When volume=vol. 23:
  • When volume=Volume 14:        
  • When volume=</b, 3rd volume:  

The concise bolded volume number "23" is a standard format for professional journals, but many readers would not understand that style for multi-volume books. Since {cite_quick} is also intended for non-journal cites, in less-formal kinds of articles, it should support both formats. At this point, I changed {cite_quick} to rapidly check for prefix "vol" in "Vol. 9" and auto-change the format from bolded "9" to insert a dot as ". Vol. 9". So, when editors set "volume=Vol..." then the bolding will be suppressed. Thank you for noting that issue, which should have been improved years ago, when others noted it as a frustrating problem. -Wikid77 02:13, 17 October 2012 (UTC)Reply

On going talk

edit

Pls see Template talk:Citation#Template:Cite quick.Moxy (talk) 20:36, 30 October 2012 (UTC)Reply

Can we add a Usage section with parameters?

edit

Can we add a Usage section with the most commonly used parameters & also the full parameter set, as one can find at Template:Cite web#Usage? It would be nice to have both of these parameter lists since many, including myself, copy & paste them into an editor than add parameter values. As it is, I have to start with {{Cite web}}, {{Cite book}}, or {{Cite journal}}, & then remove the unsupported parameters before adding quick |. I just came across {{Cite quick}} while repairing a dead link in Barak Obama, so I am unfamiliar with the parameter list; otherwise I would just add the section myself.

As an aside, it would really be great to have the oclc parameter supported for {{Cite quick |book [...}} since it provides a link to Worldcat.org, which shows the OCLC libraries that have the book.

Peaceray (talk) 19:50, 2 February 2013 (UTC)Reply

deadurl parameter

edit

If the template uses archiveurl & archivedate, then it should also use deadurl. The parameter/value pair |deadurl=no is necessary when the original URL is still live, & the an editor has supplied the archiveurl & archivedate parameters as a precaution. Using |deadurl=no will cause the link to default to the original URL, & will put the archive URL at "Archived" in "Archived from the original". Omitting or setting deadurl to another value, i.e., "yes", will cause the link to default to the archive URL, & will put the original URL at "original" in "Archived from the original". Peaceray (talk) 21:04, 2 February 2013 (UTC)Reply

Format discrepancy between { {cite web} } & { {cite quick |web} }

edit

Quality assurance department here looking for Continual improvement process...

{{Cite web |url=https://www.united.com/web/en-US/content/Contact/reservations/usandcanada.aspx?camp=virtual_expert |title=Reservations > U.S. and Canada |author=United Airlines |authorlink=United Airlines |accessdate=2012-06-11}} produces:

United Airlines. "Reservations > U.S. and Canada". Retrieved 2012-06-11.

whereas

{{Cite quick |web |url=https://www.united.com/web/en-US/content/Contact/reservations/usandcanada.aspx?camp=virtual_expert |title=Reservations > U.S. and Canada |author=United Airlines |authorlink=United Airlines |accessdate=2012-06-11}} produces:


Note the ". " after author/authorlink with the former, & the lack of it with the latter.

Peaceray (talk) 01:46, 3 February 2013 (UTC)Reply

  Fixed here (I hope without breaking anything else  ). —[AlanM1(talk)]— 18:53, 19 February 2013 (UTC)Reply

Origyear

edit

Is origyear supported? --JFH (talk) 02:12, 11 February 2013 (UTC)Reply

No more need for cite quick

edit

Now that {{cite news}}, {{cite web}}, {{cite book}} and {{cite journal}} have all been converted to used Lua-based citations via Module:Citation/CS1, I don't believe there is any reason to continue using this template. The Lua-based citations are not only faster than {{cite quick}}, they also support the full parameter set and COinS metadata, so there is no need to sacrifice any functionality. Now that they have been upgraded, I believe that it is appropriate to convert all uses of cite quick back to the prior templates. Dragons flight (talk) 18:31, 29 March 2013 (UTC)Reply

I agree, and have put it up for deletion/discussion here.--JohnBlackburnewordsdeeds 18:54, 29 March 2013 (UTC)Reply
  • Cite_quick allows 2x as many cites per page: The simple Template:Cite_quick has been shown to run as fast as the highly complex Lua versions (for the same parameters in March 2013), and hence no need to rewrite with Lua script, but also, {Cite_quick} allows more instances per page, before hitting template limits, and thereby still outperforms Template:Cite_web or Template:Cite_book, even after they were transitioned to use Lua. Also, the 2nd TfD of {cite_quick} was severely premature, as {cite_web} was just transitioned, to use Lua, only 18 hours prior to that TfD. Hence, the "paint is not even dry" on the Lua-based cite templates, and already, User:JohnBlackburne was trying again to debate deletion, as done just 5 months earlier when the eventual consensus was a strong keep due to technical performance advantages. Anyway, as a small, traditional template, {cite_quick} can be ported to the other-language wikipedias to rapidly display any citations within translated articles copied from English Wikipedia, with the cite templates inside. This TfD might have been more appropriate several months later, such as 6 months after full transition of the wp:CS1 cite templates to Lua, rather than just 18 hours after initial deployment of {cite_web} with Lua. These continual TfD's are exhausting the community's patience. -Wikid77 (talk) 14:29, 26 June 2013 (UTC)Reply
"Bibliography of South America" Old Citations  Cite_quick  Lua Citations
Execution Time (sec.) [480 cites] ~24.3 7.2 7.6 (+6%)
Preprocessor visited node count 259930 61831 32307
Preprocessor generated node count    158749 149821 149534
Post-expand include size (bytes) 1374493 452373 909871
Template argument size (bytes) 756729 168154 0
Highest expansion depth 12 8 4
Lua time usage -- -- ~0.540s
  • Cite_quick faster for mix of citations: Timing tests with several other articles in March 2013 revealed that {cite_quick} can be slightly faster (6%), than the Lua-based wp:CS1 cite templates, such as when using numerous blank parameters, as in "Bibliography of South America" compared during 20 trials. When running the benchmarking comparisons, it is important to test a wide variety of cites, in actual article pages (but without infoboxes or other extra templates). To magnify the speed differences, the cites were copied 3 times, as a total 480 cites in the page. The faster runtimes of {cite_quick}, over {{cite_web}}, might be due to faster handling of many blank parameters, or merely an artefact of background server load, because the speed is so close, the repeated timing tests could slightly favor one, or the other. The times shown in the table, are the average of the 3 lowest times of 20 repetitions (but both trended near ~8 seconds), while {cite_web/old} reached 30 sec. Various tests with using parameter "archiveurl=" have shown a slight slowing of {cite_quick}, so the speed depends on which parameters are used. Therefore, I characterize the comparison as being, essentially, {cite_quick} can "run as fast" as the Lua-based templates (although in some cases 6% faster), in actual article pages. However, {cite_quick} for years is likely to surpass the capacity of the Lua-based cite templates, as 50% more cite templates per page, compared to the Lua-based {{cite_web}} because of markup template-expansion limits in the NewPP parser. -Wikid77 (talk) 14:29, 26 June, 14:36, 27 June 2013 (UTC)Reply
Lua performance improved significantly since March (when your performance stats were calculated). I doubt there are any cases remaining where {{cite quick}} would outperform Lua citations on the basis of speed. Dragons flight (talk) 18:28, 26 June 2013 (UTC)Reply
  • Well, {cite_web} not much faster, perhaps need Lua {cite_fast}: Recent tests indicate only a 17% improvement in {cite_web} speed. However, that does seem frustrating how {cite_quick} is nearly as fast as the Lua-based wp:CS1 cite templates, and I am wondering if we created a Lua "{cite_fast}" if it could run 4x faster than Lua's {cite_web}, as 300 cites per second. -Wikid77 (talk) 14:36, 27 June 2013 (UTC)Reply