{"thread":{"id":"48513","subject":"[PATCH RFC v2 0/4] ref-filter: start using oid_object_info","startedAt":"2018-05-18T09:10:41Z","lastAt":"2018-05-18T09:10:41Z","messageCount":1,"participants":["Оля Тележная"],"isPatch":true,"patchVersion":2,"patchTotal":4},"messages":[{"id":"347971","messageId":"CAL21Bmncoc0byRWdOdk89fza4y8Lo0HbNp-gsMEFRigGGEwD2Q@mail.gmail.com","threadId":"48513","inReplyTo":null,"subject":"[PATCH RFC v2 0/4] ref-filter: start using oid_object_info","fromName":"Оля Тележная","fromEmail":"olyatelezhnaya@gmail.com","sentAt":"2018-05-18T08:19:24Z","receivedAt":"2018-05-18T09:10:41Z","isPatch":true,"sender":{"key":"olyatelezhnaya@gmail.com","avatar":"https://avatars.githubusercontent.com/u/11246099?v=4"},"body":"Hello,\nDiscussion starts here: [1], [2].\n\nUpdates:\n\nI fixed memory leaks, now we use data from oid_object_info() OR from\ngrab_commom_values() - not both as it was before.\n\nI added support for \"%(objectsize:disk)\" atom (with tests) and for\n\"%(deltabase)\" atom (without tests yet).\nI didn't support \"%(*objectsize:disk)\" and \"%(*deltabase)\" because I\ncan't see the possibility to fill these fields at the same time with\nother processes.\nI really want to discuss this moment with someone. The best idea that\nI have is to fully change grab_common_values() function so that it\nwould collect and fill all info from oid_object_info_extended(), and\nwe will invoke it before we actually get and parse full object.\n\nI am not sure with this proposed solution at all: we would still have\nthe scenario when we call both oid_object_info_extended() and\nget_object(), it means the performance will be worse in some cases. I\ndon't know if it's crucial.\n\nBy the way, do we have an official way to measure performance?\n\nI didn't add tests for %(deltabase) atom because I am not sure that it\nhas sense for for-each-ref at all: I have a guess that I added this\natom only for future using in cat-file command, and also for deref\noption %(*deltabase).\n\nI was also thinking about adding new parameter to atom, something like\nenum \"need oid_object_info\", \"need get_object\" etc, so that we could\ncollect all needed data in a shortest way. The problem is that the\ncode will be even more complicated, and I am not sure our goal worth\nit. And, anyway, there would be the scenario when we have to call both\noid_object_info_extended() and get_object(): for example, if we have\nformat=\"%(objectsize:disk) %(author)\".\n\nThanks a lot,\nWaiting for any ideas/comments!\n\n[1] https://public-inbox.org/git/CAL21Bm=6Z54-zsUq0DJqmqhSciHCDLUNXR8inDMAd-b-=QJjcA@mail.gmail.com/\n[2] https://public-inbox.org/git/xmqq8t8la81a.fsf@gitster-ct.c.googlers.com/\n"}]}