Add templated version of wiki href to link element in presets
Simon Poole
simon at poole.ch
Sat Nov 3 15:39:20 UTC 2018
I normally don't edit compressed files.
Your argument would be perfectly valid (well if we forget that the
entries have to be parsed) if the URLs were stored in a separate file,
as is, bloating a manually curated file, it is bonkers.
Simon
Am 03.11.2018 um 16:33 schrieb Dirk Stöcker:
> On Sat, 3 Nov 2018, Simon Poole wrote:
>
>> The current default preset has 12'214 lines of which roughly 5'564 are
>> used for href attributes in the "link" element. I actually suspect that
>> the number of lines used for the href entries is increasing faster than
>> the actual preset content and it is only a matter of time before they
>> will outnumber the rest. This makes the, already far too large file,
>> larger than necessary and requires continuous maintenance of the entries
>> for no good reason.
>
> This entries are maintained by an automatic script and most of the
> data is compressed away to zero (remember, JAR is a zipped file format!)
>
>> If we used a template this could be reduced to 1'500 plus a couple of
>> potential special cases. My suggestion would be to add a "template"
>> attribute to the link element, with a placeholder {country} (or similar)
>> for the two letter iso code plus the colon (including the colon makes
>> adding a special entry for EN unnecessary).
>
> What you suggest is a more complex approach, which essentially strips
> away the already perfectly compressible parts. Probably the additional
> code required will outweight the save space. So that approach will
> result in the opposite of the wanted goal.
>
> Ciao
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/josm-dev/attachments/20181103/9c5c645a/attachment.sig>
More information about the josm-dev
mailing list