hoo added a comment.

  I just thought about this a bit and did some very basic benchmarks: On my 
system I can assemble 1 million item ids in about 1.6 seconds, so I don't think 
this is a huge problem (also it means that whatever cache we use here needs to 
be damn fast, or it will be slower than what we have now).
  
  I would recommend to either not do this at all (because it's probably not 
worth it) or add a very lightweight in-memory cache in PropertyValueSnak itself 
(would be very hard to inject something here, so just do it in data model, I'd 
say). Of course we could also try to in-line some more private methods in 
ItemId, PropertyId and EntityId and see what that gives.
  
  Please also notice that profiling tends to overestimate the cost of calling 
functions, thus the instrumentation might make the many (very-lightweight) 
function calls involved here seem more expensive than they actually are.

TASK DETAIL
  https://phabricator.wikimedia.org/T243951

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: hoo
Cc: hoo, Addshore, Aklapper, Agabi10, Ladsgroup, darthmon_wmde, Nandana, Lahi, 
Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
Jonas, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to