Last modified: 2014-03-13 11:26:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T39753, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37753 - Compute meaningful size in "bogo-bytes" for entity revisions.
Compute meaningful size in "bogo-bytes" for entity revisions.
Status: RESOLVED DUPLICATE of bug 39189
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
master
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Wikidata bugs
: need-volunteer
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-20 17:52 UTC by Raimond Spekking
Modified: 2014-03-13 11:26 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Raimond Spekking 2012-06-20 17:52:26 UTC
RecentChanges shows a misleading byte difference

For this edit

http://wikidata-test-repo.wikimedia.de/w/index.php?title=Data:Q3&diff=109096&oldid=109095

RecentChanges shows:

Data:Q3‎; 17:44 . . (-3.480 Bytes)‎ . . ‎Raymond
Comment 1 denny vrandecic 2012-06-20 23:10:24 UTC
Misleading, but true, due to a change in the internal structure. I am not sure if we should display the bytediff at all, as it does not make much sense...
Comment 2 Nikola Smolenski 2012-06-21 06:24:37 UTC
Not sure how difficult it would be, but an item diff would be cute and helpful. Something like: +3 -1 ~5 (3 items added, 1 item removed, 5 items changed).
Comment 3 Daniel Kinzler 2012-06-21 10:08:38 UTC
I don't think detailed information like what Nikola suggested is possible without serious changes to the recentchanges and revision tables - something I would like to avoid.

However, the Item class could implement its getSize() method to do something smarter than just return the size of the json. The notion if "size" is purely abstract here, it could be anything. For instance it could return the number of atomic values in the structure.
Comment 4 denny vrandecic 2012-06-21 10:36:46 UTC
Yes, Daniel's suggestions sounds very reasonable.
Comment 5 Nikola Smolenski 2012-06-21 11:17:01 UTC
I've just got the idea that number of added/removed/modified items could be encoded in bits of rev_len/rc_old_len/rc_new_len fields (rev_len is 64bit IIRC) and then interpreted by the page if it is in Data namespace. Seems like an unnecessary complication, but maybe one day :)
Comment 6 Daniel Kinzler 2013-12-10 15:35:43 UTC
The current implementation of EntityContent::getSize() is:

  return strlen( serialize( $this->getNativeData() ) );

I suppose that can be improved. It would probably already help to ignore all the keys in the arrays; we could use array_walk_recursive to calculate the site efficiently.
Comment 7 Lydia Pintscher 2014-03-13 11:25:32 UTC

*** This bug has been marked as a duplicate of bug 39189 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links