How much do entity pages grow if you add snak IDs to the output?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for id in Q$RANDOM Q$RANDOM Q$RANDOM Q$RANDOM Q$RANDOM; do | |
html=$(curl -s "https://www.wikidata.org/wiki/$id"); | |
bytesCurrent=$(printf '%s' "$html" | | |
wc -c); | |
bytesWithId=$(printf '%s' "$html" | | |
sed 's|class="wikibase-snakview"|class="wikibase-snakview wikibase-snakview-0000111122223333444455556666777788889999"|g' | | |
wc -c); | |
LC_ALL=C printf '%s\nCurrent: %8d bytes\nWith ID: %8d bytes\nChange: %.3f%%\n---\n' \ | |
"$id" \ | |
"$bytesCurrent" \ | |
"$bytesWithId" \ | |
"$(bc <<< "scale=10; 100 * ($bytesWithId/$bytesCurrent - 1)")"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A very large example entity to test is Q21558717.