RESOLVED FIXED Bug 110087
WKR (new-commit-bot) is too slow
https://bugs.webkit.org/show_bug.cgi?id=110087
Summary WKR (new-commit-bot) is too slow
Ryosuke Niwa
Reported 2013-02-18 01:15:01 PST
Apparently running "svn up" or "git svn fetch" on my 5 years old MBP is way too slow and takes multiple minutes to complete. I've found a solution that dramatically reduces this time that only works on a svn checkout.
Attachments
Use svn log -r without updating checkout (3.67 KB, patch)
2013-02-18 01:17 PST, Ryosuke Niwa
no flags
Merged ToT (3.60 KB, patch)
2013-02-18 01:21 PST, Ryosuke Niwa
no flags
Also use utf-8 encoding (3.66 KB, patch)
2013-02-18 02:32 PST, Ryosuke Niwa
no flags
Fixed per comments (4.12 KB, patch)
2013-04-08 23:39 PDT, Ryosuke Niwa
ggaren: review+
Ryosuke Niwa
Comment 1 2013-02-18 01:17:42 PST
Created attachment 188816 [details] Use svn log -r without updating checkout
Ryosuke Niwa
Comment 2 2013-02-18 01:21:21 PST
Created attachment 188817 [details] Merged ToT
Ryosuke Niwa
Comment 3 2013-02-18 01:35:39 PST
I'm using the new implementation now. It's MUCH faster :D
Ryosuke Niwa
Comment 4 2013-02-18 02:32:01 PST
Created attachment 188834 [details] Also use utf-8 encoding
Adam Barth
Comment 5 2013-02-19 10:33:00 PST
Comment on attachment 188834 [details] Also use utf-8 encoding View in context: https://bugs.webkit.org/attachment.cgi?id=188834&action=review > Tools/Scripts/webkitpy/tool/commands/newcommitbot.py:79 > + for revision in range(self._last_svn_revision + 1, self._last_svn_revision + 10): 10? > Tools/Scripts/webkitpy/tool/commands/newcommitbot.py:85 > + if re.match(r'^\-+$', commit_log): > + continue What is this looking for? > Tools/Scripts/webkitpy/tool/commands/newcommitbot.py:89 > + revision += 1 Doesn't the for-in-range handle incrementing the revision?
Adam Barth
Comment 6 2013-02-19 10:33:19 PST
Does it update it's working copy periodically?
Ryosuke Niwa
Comment 7 2013-02-19 10:36:36 PST
Comment on attachment 188834 [details] Also use utf-8 encoding View in context: https://bugs.webkit.org/attachment.cgi?id=188834&action=review >> Tools/Scripts/webkitpy/tool/commands/newcommitbot.py:79 >> + for revision in range(self._last_svn_revision + 1, self._last_svn_revision + 10): > > 10? This is so that when there are many commits at once or something goes wrong, we don't end up spamming IRC with hundreds of messages. >> Tools/Scripts/webkitpy/tool/commands/newcommitbot.py:85 >> + continue > > What is this looking for? It's looking for empty entries that's filled with -------... You get this when someone commits into branches. >> Tools/Scripts/webkitpy/tool/commands/newcommitbot.py:89 >> + revision += 1 > > Doesn't the for-in-range handle incrementing the revision? Oops, yeah, we can get rid of this now.
Ryosuke Niwa
Comment 8 2013-02-19 10:37:31 PST
(In reply to comment #6) > Does it update it's working copy periodically? No. My plan is to have restart command do it.
Adam Barth
Comment 9 2013-02-19 12:15:59 PST
Comment on attachment 188834 [details] Also use utf-8 encoding View in context: https://bugs.webkit.org/attachment.cgi?id=188834&action=review >>> Tools/Scripts/webkitpy/tool/commands/newcommitbot.py:79 >>> + for revision in range(self._last_svn_revision + 1, self._last_svn_revision + 10): >> >> 10? > > This is so that when there are many commits at once or something goes wrong, we don't end up spamming IRC with hundreds of messages. OK. Can you use a named constant and explain the "why" with a comment? >>> Tools/Scripts/webkitpy/tool/commands/newcommitbot.py:85 >>> + continue >> >> What is this looking for? > > It's looking for empty entries that's filled with -------... > You get this when someone commits into branches. Can you add a helper function with a descriptive name so that folks reading this code know what its supposed to do?
Ryosuke Niwa
Comment 10 2013-02-19 14:03:31 PST
(In reply to comment #9) > (From update of attachment 188834 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=188834&action=review > > >>> Tools/Scripts/webkitpy/tool/commands/newcommitbot.py:79 > >>> + for revision in range(self._last_svn_revision + 1, self._last_svn_revision + 10): > >> > >> 10? > > > > This is so that when there are many commits at once or something goes wrong, we don't end up spamming IRC with hundreds of messages. > > OK. Can you use a named constant and explain the "why" with a comment? I'll add a named variable like _maximum_number_of_revisions_to_avoid_spamming_irc to avoid adding a comment. > >>> Tools/Scripts/webkitpy/tool/commands/newcommitbot.py:85 > >>> + continue > >> > >> What is this looking for? > > > > It's looking for empty entries that's filled with -------... > > You get this when someone commits into branches. > > Can you add a helper function with a descriptive name so that folks reading this code know what its supposed to do? Sure. _is_empty_log?
Adam Barth
Comment 11 2013-02-19 14:08:03 PST
Sure. Those names sound fine.
Ryosuke Niwa
Comment 12 2013-04-08 23:39:37 PDT
Created attachment 197004 [details] Fixed per comments
Geoffrey Garen
Comment 13 2013-04-08 23:41:27 PDT
Comment on attachment 197004 [details] Fixed per comments r=me
Ryosuke Niwa
Comment 14 2013-04-08 23:43:22 PDT
Note You need to log in before you can comment on or make changes to this bug.