Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Issue 3130039: Limit the time spent on a single iteration of PhishingDOMFeatureExtractor. (Closed)

Created:
10 years, 4 months ago by Brian Ryner
Modified:
9 years, 7 months ago
Reviewers:
lzheng, marria
CC:
chromium-reviews, Paweł Hajdan Jr., darin-cc_chromium.org, brettw-cc_chromium.org, chrome-anti-phishing_googlegroups.com
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

Limit the time spent on a single iteration of PhishingDOMFeatureExtractor. With this change, the feature extractor will keep track of how long it has been working, and if it exceeds a predefined time limit, it will pause and post a task to continue extraction. This will allow other MessageLoop tasks to run on the render thread. There is also a total time limit, after which the extractor will give up altogether -- this is a sanity check in case of a bug or an especially large page. Also includes some UMA histograms so that we can see how well this performs in practice. TEST=PhishingDOMFeatureExtractorTest.Continuation BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57243

Patch Set 1 #

Total comments: 4

Patch Set 2 : add some comments suggested by lzheng #

Patch Set 3 : tiny comment fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+234 lines, -11 lines) Patch
M chrome/chrome_renderer.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A chrome/renderer/safe_browsing/feature_extractor_clock.h View 1 chunk +29 lines, -0 lines 0 comments Download
M chrome/renderer/safe_browsing/phishing_dom_feature_extractor.h View 1 2 4 chunks +22 lines, -2 lines 0 comments Download
M chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc View 1 10 chunks +80 lines, -6 lines 0 comments Download
M chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc View 1 11 chunks +102 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Brian Ryner
10 years, 4 months ago (2010-08-20 18:08:25 UTC) #1
lzheng
http://codereview.chromium.org/3130039/diff/1/4 File chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc (right): http://codereview.chromium.org/3130039/diff/1/4#newcode168 chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc:168: // work. Log how long this takes, so we ...
10 years, 4 months ago (2010-08-20 20:54:53 UTC) #2
Brian Ryner
Please take another look. http://codereview.chromium.org/3130039/diff/1/4 File chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc (right): http://codereview.chromium.org/3130039/diff/1/4#newcode168 chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc:168: // work. Log how long ...
10 years, 4 months ago (2010-08-20 21:14:17 UTC) #3
lzheng
LGTM.
10 years, 4 months ago (2010-08-20 21:22:08 UTC) #4
marria
10 years, 4 months ago (2010-08-24 20:33:29 UTC) #5
LGTM

I like the UMA stats.  At first I was wondering if we would want them separated
by failed extractions and successful extractions, but I think the way you have
it now is fine.

Powered by Google App Engine
This is Rietveld 408576698