Skip to contentSkip to conversation

top-level gitignore considered harmful

PATCH Jeff King 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore

Jeff King

author
#0 lore raw

So we were sitting around chatting today about how slow "git status" is in the gigantic WebKit repository (because really, what else would one chat about?). Carlos noticed that git spends a lot of time in the gitignore code path. It turns out that the WebKit repository has a couple hundred excludes in the top-level .gitignore, many of which are for specific files deep in the repository.

Since these patterns are compared via fnmatch(), we have to process them linearly for each entry[1]. And since the patterns are at the top level, we check them for each of the ~180,000 files in the repository. So "git status" will do O(m*n) work, where "m" is the number of patterns and "n" is the number of files in the repository. And as a project grows over time, one might expect "m" to be some constant factor of "n". So this is really O(n^2) (albeit with some mitigating constant at the front).

All of which is to say: things can be made much faster by pushing the patterns to their respective sub-directories, because git is smart enough not to even look at patterns from other sub-directories. With the patch below to WebKit, rearranging its .gitignore and .gitattributes entries, I measured the following speedup for "git status" (warm cache, best-of-five):

before:

  real    0m1.365s
  user    0m0.996s
  sys     0m0.364s

after:

  real    0m0.847s
  user    0m0.520s
  sys     0m0.320s

None of this should be too surprising to anybody who has looked at the gitignore code. But I was a little surprised by the magnitude of the speedup. So I figured it was worth mentioning here as a case study.

I'm not going to push this patch forward to WebKit myself. I don't work on it, and the split of the gitattributes and gitignore files in the patch was purely mechanical (converting .gitignore:foo/bar/baz into foo/bar/.gitignore:baz). Somebody more familiar with the project would probably want to group the entries in a more logical way for the project (e.g., foo/.gitignore:bar/baz).

-Peff

[1] So obviously this is about something that projects can do to help git run faster on them. But we could do better in git, too. fnmatch patterns need to be examined linearly because of wildcards. But many patterns don't have wildcards, or the wildcards come much later in the pattern. There's no reason we couldn't preprocess the patterns into a data structure with fast lookup properties, grouped by non-wildcard prefixes (so seeing "foo/bar/*.baz", we could build a trie that lets us reject "other/directory" after only a single-character match).

---
This is the patch against WebKit:

.gitattributes +0 -225
index 95ca4eb..af87a9a 100644
@@ -18,228 +18,3 @@ Tools/WebKitLauncher/*.h diff=objcppheader
 *.vcproj eol=crlf
 *.vsprops eol=crlf
 *.sln eol=crlf
-
-LayoutTests/dom/svg/level3/xpath/Attribute_Nodes.svg -crlf
-LayoutTests/dom/svg/level3/xpath/Attribute_Nodes_xmlns.svg -crlf
-LayoutTests/dom/svg/level3/xpath/Comment_Nodes.svg -crlf
-LayoutTests/dom/svg/level3/xpath/Conformance_Expressions.svg -crlf
-LayoutTests/dom/svg/level3/xpath/Conformance_ID.svg -crlf
-LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_3.svg -crlf
-LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_empty.svg -crlf
-LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_null.svg -crlf
-LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_3.svg -crlf
-LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_empty.svg -crlf
-LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_null.svg -crlf
-LayoutTests/dom/svg/level3/xpath/Element_Nodes.svg -crlf
-LayoutTests/dom/svg/level3/xpath/Processing_Instruction_Nodes.svg -crlf
-LayoutTests/dom/svg/level3/xpath/Text_Nodes.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluatorCast01.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NS.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_document.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_document.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_documentElement.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_null.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_TYPE_ERR.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_booleanValue_false.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_booleanValue_true.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_numberValue.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_resultType.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE.svg -crlf
-LayoutTests/dom/svg/level3/xpath/XPathResult_stringValue.svg -crlf
-LayoutTests/editing/execCommand/align-in-span.html -crlf
-LayoutTests/editing/selection/drag-start-event-client-x-y.html -crlf
-LayoutTests/fast/backgrounds/background-position-rounding.html -crlf
-LayoutTests/fast/backgrounds/repeat/resources/background-repeat-shorthand.js -crlf
-LayoutTests/fast/backgrounds/repeat/resources/margin-shorthand.js -crlf
-LayoutTests/fast/block/float/clamped-right-float.html -crlf
-LayoutTests/fast/block/positioning/absolute-with-html-border-quirks.html -crlf
-LayoutTests/fast/block/positioning/absolute-with-html-border-strict.html -crlf
-LayoutTests/fast/canvas/script-tests/canvas-gradient-without-path.js -crlf
-LayoutTests/fast/css/color-quirk.html -crlf
-LayoutTests/fast/css/color-strict.html -crlf
-LayoutTests/fast/css/css1_forward_compatible_parsing.html -crlf
-LayoutTests/fast/css/empty-pseudo-class.html -crlf
-LayoutTests/fast/css/first-child-pseudo-class.html -crlf
-LayoutTests/fast/css/first-of-type-pseudo-class.html -crlf
-LayoutTests/fast/css/last-child-pseudo-class.html -crlf
-LayoutTests/fast/css/last-of-type-pseudo-class.html -crlf
-LayoutTests/fast/css/only-child-pseudo-class.html -crlf
-LayoutTests/fast/css/only-of-type-pseudo-class.html -crlf
-LayoutTests/fast/css/text-input-with-webkit-border-radius.html -crlf
-LayoutTests/fast/dom/Document/open-with-pending-load.html -crlf
-LayoutTests/fast/dom/Element/hostname-host.html -crlf
-LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2.html -crlf
-LayoutTests/fast/dom/Window/window-property-clearing-expected.txt -crlf
-LayoutTests/fast/dom/everything-to-string.html -crlf
-LayoutTests/fast/dom/insert-span-into-long-text-bug-28245.html -crlf
-LayoutTests/fast/dom/resources/TestApplet.java -crlf
-LayoutTests/fast/dom/simultaneouslyRegsiteredTimerFireOrder-expected.txt -crlf
-LayoutTests/fast/dom/timer-clear-interval-in-handler-and-generate-error.html -crlf
-LayoutTests/fast/events/keydown-keypress-focus-change.html -crlf
-LayoutTests/fast/events/node-event-anchor-lock.html -crlf
-LayoutTests/fast/events/onload-fires-twice.html -crlf
-LayoutTests/fast/events/set-event-in-another-frame.html -crlf
-LayoutTests/fast/events/set-event-to-null.html -crlf
-LayoutTests/fast/forms/resources/form-and-frame-interaction-retains-values-main.html -crlf
-LayoutTests/fast/forms/resources/form-and-frame-interaction-retains-values-submit.html -crlf
-LayoutTests/fast/forms/select-remove-option.html -crlf
-LayoutTests/fast/forms/select-reset-multiple-selections-4-single-selection.html -crlf
-LayoutTests/fast/forms/textfield-onchange-deletion.html -crlf
-LayoutTests/fast/frames/frame-src-attribute.html -crlf
-LayoutTests/fast/frames/iframe-scroll-page-up-down.html-disabled -crlf
-LayoutTests/fast/frames/javascript-url-as-framesrc-crash.html -crlf
-LayoutTests/fast/frames/resources/iframe-scroll-page-up-down-1.html -crlf
-LayoutTests/fast/frames/resources/iframe-scroll-page-up-down-2.html -crlf
-LayoutTests/fast/frames/viewsource-attribute.html -crlf
-LayoutTests/fast/inline/inline-padding-disables-text-quirk.html -crlf
-LayoutTests/fast/loader/submit-form-while-parsing-1.xhtml -crlf
-LayoutTests/fast/overflow/dynamic-hidden.html -crlf
-LayoutTests/fast/parser/external-entities-in-xslt.xml -crlf
-LayoutTests/fast/parser/external-entities.xml -crlf
-LayoutTests/fast/parser/resources/external-entities.xsl -crlf
-LayoutTests/fast/replaced/replaced-breaking.html -crlf
-LayoutTests/fast/table/dynamic-cellpadding.html -crlf
-LayoutTests/fast/table/fixed-table-with-percent-inside-percent-table.html -crlf
-LayoutTests/fast/table/fixed-table-with-percent-width-inside-auto-table.html -crlf
-LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div.html -crlf
-LayoutTests/fast/table/fixed-table-with-small-percent-width.html -crlf
-LayoutTests/fast/table/rules-attr-dynchange1.html -crlf
-LayoutTests/fast/table/rules-attr-dynchange2.html -crlf
-LayoutTests/fast/text/international/thai-baht-space.html -crlf
-LayoutTests/fast/text/resources/line-breaks-crlf.txt -crlf
-LayoutTests/fast/text/text-large-negative-letter-spacing-with-opacity.html -crlf
-LayoutTests/fast/text/text-letter-spacing.html -crlf
-LayoutTests/http/tests/appcache/max-size.html -crlf
-LayoutTests/http/tests/misc/location-test-xsl-style-sheet.xml -crlf
-LayoutTests/http/tests/misc/resources/location-test-xsl-style-sheet.xsl -crlf
-LayoutTests/http/tests/misc/single-character-pi-stylesheet.xhtml -crlf
-LayoutTests/http/tests/misc/will-send-request-returns-null-on-redirect.html -crlf
-LayoutTests/http/tests/navigation/no-referrer-reset.html -crlf
-LayoutTests/http/tests/navigation/no-referrer-same-window.html -crlf
-LayoutTests/http/tests/navigation/no-referrer-subframe.html -crlf
-LayoutTests/http/tests/navigation/no-referrer-target-blank.html -crlf
-LayoutTests/http/tests/navigation/resources/no-referrer-same-window-helper.php -crlf
-LayoutTests/http/tests/security/isolatedWorld/events.html -crlf
-LayoutTests/http/tests/security/isolatedWorld/resources/iframe.html -crlf
-LayoutTests/http/tests/security/isolatedWorld/resources/userGestureEvents-second-window.html -crlf
-LayoutTests/http/tests/security/isolatedWorld/userGestureEvents.html -crlf
-LayoutTests/http/tests/security/resources/empty-svg.php -crlf
-LayoutTests/platform/win/fast/events/panScroll-event-fired.html -crlf
-LayoutTests/platform/win/fast/events/panScroll-image-no-scroll.html -crlf
-LayoutTests/platform/win/fast/events/panScroll-imageMap-href-no-scroll.html -crlf
-LayoutTests/platform/win/fast/events/panScroll-imageMap-noHref-scroll.html -crlf
-LayoutTests/platform/win/fast/events/panScroll-nested-divs.html -crlf
-LayoutTests/platform/win/fast/events/panScroll-no-iframe-jump.html -crlf
-LayoutTests/platform/win/fast/events/panScroll-preventDefault.html -crlf
-LayoutTests/svg/custom/marker-opacity.svg -crlf
-LayoutTests/svg/custom/resources/graffiti.svg -crlf
-LayoutTests/svg/custom/struct-use-09-b.svg -crlf
-LayoutTests/svg/custom/svg-fonts-in-html.html -crlf
-LayoutTests/svg/custom/use-events-crash.svg -crlf
-LayoutTests/svg/custom/use-on-symbol-inside-pattern.svg -crlf
-LayoutTests/svg/custom/use-setAttribute-crash.svg -crlf
-LayoutTests/svg/custom/xml-stylesheet.svg -crlf
-LayoutTests/tables/mozilla/bugs/bug119786.html -crlf
-LayoutTests/tables/mozilla/bugs/bug222846.html -crlf
-LayoutTests/tables/mozilla/bugs/bug275625.html -crlf
-LayoutTests/tables/mozilla/images/aboutHeader.gif -crlf
-LayoutTests/tables/mozilla/images/main-horizontal-scroll.gif -crlf
-LayoutTests/tables/mozilla_expected_failures/bugs/bug101759.html -crlf
-LayoutTests/tables/mozilla_expected_failures/bugs/bug14489.html -crlf
-LayoutTests/tables/mozilla_expected_failures/images/aboutHeader.gif -crlf
-LayoutTests/tables/mozilla_expected_failures/images/main-horizontal-scroll.gif -crlf
-LayoutTests/wml/resources/enter-card-with-events.wml -crlf
-LayoutTests/wml/resources/enter-first-card-with-events.wml -crlf
-ManualTests/DOMContextMenuEvent.html -crlf
-ManualTests/cursor-max-size.html -crlf
-ManualTests/drag-with-div-or-image-as-data-image.html -crlf
-ManualTests/empty-script-crash.html -crlf
-ManualTests/remove-form-node-with-radio-buttons-crash.html -crlf
-ManualTests/select-delete-item.html -crlf
-ManualTests/textarea-caret-position-after-auto-spell-correct.html -crlf
-PerformanceTests/PageLoad/svg/files/Harvey_Rayner.svg -crlf
-PerformanceTests/PageLoad/svg/files/cacuts_02.svg -crlf
-PerformanceTests/PageLoad/svg/files/crawfish2_ganson.svg -crlf
-PerformanceTests/PageLoad/svg/files/france.svg -crlf
-PerformanceTests/PageLoad/svg/files/mtsthelens.svg -crlf
-PerformanceTests/PageLoad/svg/files/worldcup.svg -crlf
-PerformanceTests/SunSpider/tests/parse-only/jquery-1.3.2.js -crlf
-Source/WebCore/accessibility/AccessibilityAllInOne.cpp -crlf
-Source/WebCore/bindings/js/JSExceptionBase.cpp -crlf
-Source/WebCore/bindings/js/JSExceptionBase.h -crlf
-Source/WebCore/inspector/Inspector.json -crlf
-Source/WebCore/platform/chromium/SuddenTerminationChromium.cpp -crlf
-Source/WebCore/platform/network/win/NetworkStateNotifierWin.cpp -crlf
-Source/WebCore/platform/wx/wxcode/non-kerned-drawing.h -crlf
-Source/WebCore/rendering/RenderThemeChromiumWin.h -crlf
-Tools/BuildSlaveSupport/win/kill-old-processes -crlf
-Tools/DumpRenderTree/cairo/PixelDumpSupportCairo.cpp -crlf
-Tools/FindSafari/Safari.exe.manifest -crlf
-Tools/MiniBrowser/win/MiniBrowser.rc -crlf
-Tools/TestResultServer/index.yaml -crlf
-Tools/WinLauncher/WinLauncher.h -crlf
-Tools/record-memory-win/main.cpp -crlf
-WebKit/chromium/src/EventListenerWrapper.cpp -crlf
-WebKit/chromium/src/EventListenerWrapper.h -crlf
-WebKit/chromium/src/WebEventListener.cpp -crlf
-WebKit/chromium/src/WebEventListenerPrivate.cpp -crlf
-WebKit/chromium/src/WebEventListenerPrivate.h -crlf
-WebKit/gtk/po/sr.po -crlf
-WebKit/gtk/po/[email protected] -crlf
-WebKit/qt/tests/qwebframe/resources/testiframe.html -crlf
-WebKit/qt/tests/qwebframe/resources/testiframe2.html -crlf
-WebKit/win/COMPropertyBag.h -crlf
-WebKit/win/COMVariantSetter.h -crlf
-WebKit/win/Interfaces/IWebEmbeddedView.idl -crlf
-WebKit/win/Interfaces/JavaScriptCoreAPITypes.idl -crlf
-WebKit/win/WebCoreSupport/EmbeddedWidget.cpp -crlf
-WebKit/win/WebCoreSupport/EmbeddedWidget.h -crlf
-WebKit/win/WebCoreSupport/WebInspectorDelegate.h -crlf
-WebKit/win/WebIconFetcher.cpp -crlf
-WebKit/win/WebIconFetcher.h -crlf
-Websites/planet.webkit.org/planet/LICENCE -crlf
-Websites/webkit.org/blog/license.txt -crlf
-Websites/webkit.org/blog/wp-config-sample.php -crlf
-Websites/webkit.org/blog/wp-config.php -crlf
-Websites/webkit.org/blog/wp-includes/images/crystal/license.txt -crlf
-Websites/webkit.org/blog/wp-includes/js/scriptaculous/MIT-LICENSE -crlf
-Websites/webkit.org/blog/wp-includes/js/swfupload/plugins/swfupload.speed.js -crlf
-Websites/webkit.org/blog/wp-includes/js/tinymce/license.txt -crlf
-Websites/webkit.org/perf/slickspeed/frameworks/DomQuery.js -crlf
.gitignore +1 -150

175 lines not on this page · raw message

LayoutTests/dom/svg/level3/xpath/.gitattributes new file +64 -0

64 lines not on this page · raw message

LayoutTests/editing/execCommand/.gitattributes new file +1 -0
new file mode 100644
index 0000000..04bf4a9
@@ -0,0 +1 @@
+align-in-span.html -crlf
LayoutTests/editing/selection/.gitattributes new file +1 -0
new file mode 100644
index 0000000..ca0c670
@@ -0,0 +1 @@
+drag-start-event-client-x-y.html -crlf
LayoutTests/fast/backgrounds/.gitattributes new file +1 -0
new file mode 100644
index 0000000..2aa75eb
@@ -0,0 +1 @@
+background-position-rounding.html -crlf
LayoutTests/fast/backgrounds/repeat/resources/.gitattributes new file +2 -0
new file mode 100644
index 0000000..dd027c2
@@ -0,0 +1,2 @@
+background-repeat-shorthand.js -crlf
+margin-shorthand.js -crlf
LayoutTests/fast/block/float/.gitattributes new file +1 -0
new file mode 100644
index 0000000..f512732
@@ -0,0 +1 @@
+clamped-right-float.html -crlf
LayoutTests/fast/block/positioning/.gitattributes new file +2 -0
new file mode 100644
index 0000000..c0a1894
@@ -0,0 +1,2 @@
+absolute-with-html-border-quirks.html -crlf
+absolute-with-html-border-strict.html -crlf
LayoutTests/fast/canvas/script-tests/.gitattributes new file +1 -0
new file mode 100644
index 0000000..05e539b
@@ -0,0 +1 @@
+canvas-gradient-without-path.js -crlf
LayoutTests/fast/css/.gitattributes new file +11 -0
new file mode 100644
index 0000000..820b6ef
@@ -0,0 +1,11 @@
+color-quirk.html -crlf
+color-strict.html -crlf
+css1_forward_compatible_parsing.html -crlf
+empty-pseudo-class.html -crlf
+first-child-pseudo-class.html -crlf
+first-of-type-pseudo-class.html -crlf
+last-child-pseudo-class.html -crlf
+last-of-type-pseudo-class.html -crlf
+only-child-pseudo-class.html -crlf
+only-of-type-pseudo-class.html -crlf
+text-input-with-webkit-border-radius.html -crlf
LayoutTests/fast/dom/.gitattributes new file +4 -0
new file mode 100644
index 0000000..a608bdd
@@ -0,0 +1,4 @@
+everything-to-string.html -crlf
+insert-span-into-long-text-bug-28245.html -crlf
+simultaneouslyRegsiteredTimerFireOrder-expected.txt -crlf
+timer-clear-interval-in-handler-and-generate-error.html -crlf
LayoutTests/fast/dom/Document/.gitattributes new file +1 -0
new file mode 100644
index 0000000..1243d6b
@@ -0,0 +1 @@
+open-with-pending-load.html -crlf
LayoutTests/fast/dom/Element/.gitattributes new file +1 -0
new file mode 100644
index 0000000..7107de1
@@ -0,0 +1 @@
+hostname-host.html -crlf
LayoutTests/fast/dom/StyleSheet/.gitattributes new file +1 -0
new file mode 100644
index 0000000..9b8cfbb
@@ -0,0 +1 @@
+ownerNode-lifetime-2.html -crlf
LayoutTests/fast/dom/Window/.gitattributes new file +1 -0
new file mode 100644
index 0000000..b8c449a
@@ -0,0 +1 @@
+window-property-clearing-expected.txt -crlf
LayoutTests/fast/dom/resources/.gitattributes new file +1 -0
new file mode 100644
index 0000000..a6f19cf
@@ -0,0 +1 @@
+TestApplet.java -crlf
LayoutTests/fast/events/.gitattributes new file +5 -0
new file mode 100644
index 0000000..298edb1
@@ -0,0 +1,5 @@
+keydown-keypress-focus-change.html -crlf
+node-event-anchor-lock.html -crlf
+onload-fires-twice.html -crlf
+set-event-in-another-frame.html -crlf
+set-event-to-null.html -crlf
LayoutTests/fast/forms/.gitattributes new file +3 -0
new file mode 100644
index 0000000..242fe88
@@ -0,0 +1,3 @@
+select-remove-option.html -crlf
+select-reset-multiple-selections-4-single-selection.html -crlf
+textfield-onchange-deletion.html -crlf
LayoutTests/fast/forms/resources/.gitattributes new file +2 -0
new file mode 100644
index 0000000..2e5880c
@@ -0,0 +1,2 @@
+form-and-frame-interaction-retains-values-main.html -crlf
+form-and-frame-interaction-retains-values-submit.html -crlf
LayoutTests/fast/frames/.gitattributes new file +4 -0
new file mode 100644
index 0000000..fd8c796
@@ -0,0 +1,4 @@
+frame-src-attribute.html -crlf
+iframe-scroll-page-up-down.html-disabled -crlf
+javascript-url-as-framesrc-crash.html -crlf
+viewsource-attribute.html -crlf
LayoutTests/fast/frames/resources/.gitattributes new file +2 -0
new file mode 100644
index 0000000..60c707e
@@ -0,0 +1,2 @@
+iframe-scroll-page-up-down-1.html -crlf
+iframe-scroll-page-up-down-2.html -crlf
LayoutTests/fast/inline/.gitattributes new file +1 -0
new file mode 100644
index 0000000..d6777a7
@@ -0,0 +1 @@
+inline-padding-disables-text-quirk.html -crlf
LayoutTests/fast/loader/.gitattributes new file +1 -0
new file mode 100644
index 0000000..f5be30c
@@ -0,0 +1 @@
+submit-form-while-parsing-1.xhtml -crlf
LayoutTests/fast/overflow/.gitattributes new file +1 -0
new file mode 100644
index 0000000..ea02989
@@ -0,0 +1 @@
+dynamic-hidden.html -crlf
LayoutTests/fast/parser/.gitattributes new file +2 -0
new file mode 100644
index 0000000..c2f6e89
@@ -0,0 +1,2 @@
+external-entities-in-xslt.xml -crlf
+external-entities.xml -crlf
LayoutTests/fast/parser/resources/.gitattributes new file +1 -0
new file mode 100644
index 0000000..1d42fef
@@ -0,0 +1 @@
+external-entities.xsl -crlf
LayoutTests/fast/replaced/.gitattributes new file +1 -0
new file mode 100644
index 0000000..7c26794
@@ -0,0 +1 @@
+replaced-breaking.html -crlf
LayoutTests/fast/table/.gitattributes new file +7 -0
new file mode 100644
index 0000000..21dfd1f
@@ -0,0 +1,7 @@
+dynamic-cellpadding.html -crlf
+fixed-table-with-percent-inside-percent-table.html -crlf
+fixed-table-with-percent-width-inside-auto-table.html -crlf
+fixed-table-with-percent-width-inside-extra-large-div.html -crlf
+fixed-table-with-small-percent-width.html -crlf
+rules-attr-dynchange1.html -crlf
+rules-attr-dynchange2.html -crlf
LayoutTests/fast/text/.gitattributes new file +2 -0
new file mode 100644
index 0000000..3b9ef57
@@ -0,0 +1,2 @@
+text-large-negative-letter-spacing-with-opacity.html -crlf
+text-letter-spacing.html -crlf
LayoutTests/fast/text/international/.gitattributes new file +1 -0
new file mode 100644
index 0000000..ee4c44c
@@ -0,0 +1 @@
+thai-baht-space.html -crlf
LayoutTests/fast/text/resources/.gitattributes new file +1 -0
new file mode 100644
index 0000000..884326c
@@ -0,0 +1 @@
+line-breaks-crlf.txt -crlf
LayoutTests/http/tests/appcache/.gitattributes new file +1 -0
new file mode 100644
index 0000000..c749988
@@ -0,0 +1 @@
+max-size.html -crlf
LayoutTests/http/tests/misc/.gitattributes new file +3 -0
new file mode 100644
index 0000000..5634218
@@ -0,0 +1,3 @@
+location-test-xsl-style-sheet.xml -crlf
+single-character-pi-stylesheet.xhtml -crlf
+will-send-request-returns-null-on-redirect.html -crlf
LayoutTests/http/tests/misc/resources/.gitattributes new file +1 -0
new file mode 100644
index 0000000..a5c38d1
@@ -0,0 +1 @@
+location-test-xsl-style-sheet.xsl -crlf
LayoutTests/http/tests/navigation/.gitattributes new file +4 -0
new file mode 100644
index 0000000..2741d39
@@ -0,0 +1,4 @@
+no-referrer-reset.html -crlf
+no-referrer-same-window.html -crlf
+no-referrer-subframe.html -crlf
+no-referrer-target-blank.html -crlf
LayoutTests/http/tests/navigation/resources/.gitattributes new file +1 -0
new file mode 100644
index 0000000..033bbc8
@@ -0,0 +1 @@
+no-referrer-same-window-helper.php -crlf
LayoutTests/http/tests/security/isolatedWorld/.gitattributes new file +2 -0
new file mode 100644
index 0000000..af10950
@@ -0,0 +1,2 @@
+events.html -crlf
+userGestureEvents.html -crlf
LayoutTests/http/tests/security/isolatedWorld/resources/.gitattributes new file +2 -0
new file mode 100644
index 0000000..06b7c51
@@ -0,0 +1,2 @@
+iframe.html -crlf
+userGestureEvents-second-window.html -crlf
LayoutTests/http/tests/security/resources/.gitattributes new file +1 -0
new file mode 100644
index 0000000..b0a4eac
@@ -0,0 +1 @@
+empty-svg.php -crlf
LayoutTests/java/.gitignore new file +1 -0
new file mode 100644
index 0000000..6b468b6
@@ -0,0 +1 @@
+*.class
LayoutTests/platform/win/fast/events/.gitattributes new file +7 -0
new file mode 100644
index 0000000..68eac78
@@ -0,0 +1,7 @@
+panScroll-event-fired.html -crlf
+panScroll-image-no-scroll.html -crlf
+panScroll-imageMap-href-no-scroll.html -crlf
+panScroll-imageMap-noHref-scroll.html -crlf
+panScroll-nested-divs.html -crlf
+panScroll-no-iframe-jump.html -crlf
+panScroll-preventDefault.html -crlf
LayoutTests/svg/custom/.gitattributes new file +7 -0
new file mode 100644
index 0000000..df1b91a
@@ -0,0 +1,7 @@
+marker-opacity.svg -crlf
+struct-use-09-b.svg -crlf
+svg-fonts-in-html.html -crlf
+use-events-crash.svg -crlf
+use-on-symbol-inside-pattern.svg -crlf
+use-setAttribute-crash.svg -crlf
+xml-stylesheet.svg -crlf
LayoutTests/svg/custom/resources/.gitattributes new file +1 -0
new file mode 100644
index 0000000..9ab7f69
@@ -0,0 +1 @@
+graffiti.svg -crlf
LayoutTests/tables/mozilla/bugs/.gitattributes new file +3 -0
new file mode 100644
index 0000000..d29a664
@@ -0,0 +1,3 @@
+bug119786.html -crlf
+bug222846.html -crlf
+bug275625.html -crlf
LayoutTests/tables/mozilla/images/.gitattributes new file +2 -0
new file mode 100644
index 0000000..c5fc266
@@ -0,0 +1,2 @@
+aboutHeader.gif -crlf
+main-horizontal-scroll.gif -crlf
LayoutTests/tables/mozilla_expected_failures/bugs/.gitattributes new file +2 -0
new file mode 100644
index 0000000..2e2821e
@@ -0,0 +1,2 @@
+bug101759.html -crlf
+bug14489.html -crlf
LayoutTests/tables/mozilla_expected_failures/images/.gitattributes new file +2 -0
new file mode 100644
index 0000000..c5fc266
@@ -0,0 +1,2 @@
+aboutHeader.gif -crlf
+main-horizontal-scroll.gif -crlf
LayoutTests/wml/resources/.gitattributes new file +2 -0
new file mode 100644
index 0000000..74b19cc
@@ -0,0 +1,2 @@
+enter-card-with-events.wml -crlf
+enter-first-card-with-events.wml -crlf
ManualTests/.gitattributes new file +7 -0
new file mode 100644
index 0000000..379f2f5
@@ -0,0 +1,7 @@
+DOMContextMenuEvent.html -crlf
+cursor-max-size.html -crlf
+drag-with-div-or-image-as-data-image.html -crlf
+empty-script-crash.html -crlf
+remove-form-node-with-radio-buttons-crash.html -crlf
+select-delete-item.html -crlf
+textarea-caret-position-after-auto-spell-correct.html -crlf
PerformanceTests/PageLoad/svg/files/.gitattributes new file +6 -0
new file mode 100644
index 0000000..d787670
@@ -0,0 +1,6 @@
+Harvey_Rayner.svg -crlf
+cacuts_02.svg -crlf
+crawfish2_ganson.svg -crlf
+france.svg -crlf
+mtsthelens.svg -crlf
+worldcup.svg -crlf
PerformanceTests/SunSpider/tests/parse-only/.gitattributes new file +1 -0
new file mode 100644
index 0000000..8985d0a
@@ -0,0 +1 @@
+jquery-1.3.2.js -crlf
Source/.gitignore new file +1 -0
new file mode 100644
index 0000000..a890840
@@ -0,0 +1 @@
+qtwebkitversion.h
Source/JavaScriptCore/JavaScriptCore.gyp/.gitignore new file +5 -0
new file mode 100644
index 0000000..9b06f58
@@ -0,0 +1,5 @@
+*.Makefile
+*.mk
+*.sln
+*.vcproj*
+JavaScriptCore.xcodeproj
Source/Platform/Platform.gyp/.gitignore new file +5 -0
new file mode 100644
index 0000000..72f70a2
@@ -0,0 +1,5 @@
+*.Makefile
+*.mk
+*.sln
+*.vcproj*
+*.xcodeproj*
Source/ThirdParty/glu/.gitignore new file +5 -0
new file mode 100644
index 0000000..ce486c6
@@ -0,0 +1,5 @@
+*.Makefile
+*.mk
+*.sln
+*.vcproj
+glu.xcodeproj
Source/WTF/WTF.gyp/.gitignore new file +5 -0
new file mode 100644
index 0000000..37f58cd
@@ -0,0 +1,5 @@
+*.Makefile
+*.mk
+*.sln
+*.vcproj*
+WTF.xcodeproj
Source/WebCore/WebCore.gyp/.gitignore new file +7 -0
new file mode 100644
index 0000000..f2f101c
@@ -0,0 +1,7 @@
+*.Makefile
+*.mk
+*.rules
+*.sln
+*.tmp
+*.vcproj*
+WebCore.xcodeproj
Source/WebCore/accessibility/.gitattributes new file +1 -0
new file mode 100644
index 0000000..92bc8aa
@@ -0,0 +1 @@
+AccessibilityAllInOne.cpp -crlf
Source/WebCore/bindings/js/.gitattributes new file +2 -0
new file mode 100644
index 0000000..c0c93ec
@@ -0,0 +1,2 @@
+JSExceptionBase.cpp -crlf
+JSExceptionBase.h -crlf
Source/WebCore/inspector/.gitattributes new file +1 -0
new file mode 100644
index 0000000..30859d7
@@ -0,0 +1 @@
+Inspector.json -crlf
Source/WebCore/platform/chromium/.gitattributes new file +1 -0
new file mode 100644
index 0000000..36e6332
@@ -0,0 +1 @@
+SuddenTerminationChromium.cpp -crlf
Source/WebCore/platform/network/win/.gitattributes new file +1 -0
new file mode 100644
index 0000000..6cd8b48
@@ -0,0 +1 @@
+NetworkStateNotifierWin.cpp -crlf
Source/WebCore/platform/wx/wxcode/.gitattributes new file +1 -0
new file mode 100644
index 0000000..2d4de5a
@@ -0,0 +1 @@
+non-kerned-drawing.h -crlf
Source/WebCore/rendering/.gitattributes new file +1 -0
new file mode 100644
index 0000000..c5494d3
@@ -0,0 +1 @@
+RenderThemeChromiumWin.h -crlf
Source/WebKit/chromium/.gitignore new file +32 -0
new file mode 100644
index 0000000..8f2d4e1
@@ -0,0 +1,32 @@
+*.Makefile
+*.mk
+*.sln
+*.vcproj*
+All.xcodeproj
+WebKit.xcodeproj
+WebKitUnitTests.xcodeproj
+.gclient
+.gclient_entries
+base
+chromium_deps
+crypto
+depot_tools
+dbus
+gfx
+googleurl
+gpu
+ipc
+media
+net
+ppapi
+printing
+sdch
+skia
+sql
+testing
+third_party
+tools
+ui
+v8
+webkit
+xcodebuild
Source/WebKit/gtk/docs/.gitignore new file +1 -0
new file mode 100644
index 0000000..535c651
@@ -0,0 +1 @@
+GNUmakefile.in
Source/WebKit/gtk/po/.gitignore new file +1 -0
new file mode 100644
index 0000000..e3a8c5d
@@ -0,0 +1 @@
+*.pot
Source/autotools/.gitignore new file +13 -0
new file mode 100644
index 0000000..f02f1fa
@@ -0,0 +1,13 @@
+compile
+config.guess
+config.sub
+depcomp
+gtk-doc.m4
+install-sh
+libtool.m4
+ltmain.sh
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+lt~obsolete.m4
+missing
Tools/BuildSlaveSupport/win/.gitattributes new file +1 -0
new file mode 100644
index 0000000..d952441
@@ -0,0 +1 @@
+kill-old-processes -crlf
Tools/DumpRenderTree/DumpRenderTree.gyp/.gitignore new file +5 -0
new file mode 100644
index 0000000..72f70a2
@@ -0,0 +1,5 @@
+*.Makefile
+*.mk
+*.sln
+*.vcproj*
+*.xcodeproj*
Tools/DumpRenderTree/cairo/.gitattributes new file +1 -0
new file mode 100644
index 0000000..31b4e3c
@@ -0,0 +1 @@
+PixelDumpSupportCairo.cpp -crlf
Tools/FindSafari/.gitattributes new file +1 -0
new file mode 100644
index 0000000..767439c
@@ -0,0 +1 @@
+Safari.exe.manifest -crlf
Tools/MiniBrowser/win/.gitattributes new file +1 -0
new file mode 100644
index 0000000..3cc5165
@@ -0,0 +1 @@
+MiniBrowser.rc -crlf
Tools/TestResultServer/.gitattributes new file +1 -0
new file mode 100644
index 0000000..8233a98
@@ -0,0 +1 @@
+index.yaml -crlf
Tools/TestWebKitAPI/TestWebKitAPI.gyp/.gitignore new file +5 -0
new file mode 100644
index 0000000..72f70a2
@@ -0,0 +1,5 @@
+*.Makefile
+*.mk
+*.sln
+*.vcproj*
+*.xcodeproj*
Tools/WinLauncher/.gitattributes new file +1 -0
new file mode 100644
index 0000000..73a057d
@@ -0,0 +1 @@
+WinLauncher.h -crlf
Tools/qmake/.gitignore new file +1 -0
new file mode 100644
index 0000000..52e11bd
@@ -0,0 +1 @@
+.build-hint
Tools/record-memory-win/.gitattributes new file +1 -0
new file mode 100644
index 0000000..7d2ec04
@@ -0,0 +1 @@
+main.cpp -crlf
WebKit/chromium/src/.gitattributes new file +5 -0
new file mode 100644
index 0000000..f175d03
@@ -0,0 +1,5 @@
+EventListenerWrapper.cpp -crlf
+EventListenerWrapper.h -crlf
+WebEventListener.cpp -crlf
+WebEventListenerPrivate.cpp -crlf
+WebEventListenerPrivate.h -crlf
WebKit/gtk/po/.gitattributes new file +2 -0
new file mode 100644
index 0000000..a966a9c
@@ -0,0 +1,2 @@
+sr.po -crlf
[email protected] -crlf
WebKit/qt/tests/qwebframe/resources/.gitattributes new file +2 -0
new file mode 100644
index 0000000..05fe0f9
@@ -0,0 +1,2 @@
+testiframe.html -crlf
+testiframe2.html -crlf
WebKit/win/.gitattributes new file +4 -0
new file mode 100644
index 0000000..d51f44d
@@ -0,0 +1,4 @@
+COMPropertyBag.h -crlf
+COMVariantSetter.h -crlf
+WebIconFetcher.cpp -crlf
+WebIconFetcher.h -crlf
WebKit/win/Interfaces/.gitattributes new file +2 -0
new file mode 100644
index 0000000..0013d7e
@@ -0,0 +1,2 @@
+IWebEmbeddedView.idl -crlf
+JavaScriptCoreAPITypes.idl -crlf
WebKit/win/WebCoreSupport/.gitattributes new file +3 -0
new file mode 100644
index 0000000..9fbcc3c
@@ -0,0 +1,3 @@
+EmbeddedWidget.cpp -crlf
+EmbeddedWidget.h -crlf
+WebInspectorDelegate.h -crlf
WebKitLibraries/win/.gitignore new file +4 -0
new file mode 100644
index 0000000..fd8b39e
@@ -0,0 +1,4 @@
+Software License Agreement for WebKit Support Libraries.rtf
+WebKitAuxiliaryLibrary.headers
+WebKitAuxiliaryLibraryVersion
+WebKitChangesToPthreads.diff
WebKitLibraries/win/include/.gitignore new file +28 -0
new file mode 100644
index 0000000..77a6ab8
@@ -0,0 +1,28 @@
+ApplicationServices
+AssertMacros.h
+Availability.h
+AvailabilityInternal.h
+AvailabilityMacros.h
+CFNetwork
+ColorSync
+ConditionalMacros.h
+CoreFoundation
+CoreGraphics
+CoreServices
+ImageIO
+QuartzCore
+SQLite
+SafariTheme
+TargetConditionals.h
+checkint.h
+dispatch
+inttypes.h
+libxml
+libxslt
+pthreads
+stdbool.h
+stdint.h
+unicode
+unistd.h
+xlocale.h
+zlib
WebKitLibraries/win/lib/.gitignore new file +15 -0
new file mode 100644
index 0000000..ae9b657
@@ -0,0 +1,15 @@
+CFNetwork.lib
+CoreFoundation.lib
+CoreGraphics.lib
+QuartzCore.lib
+SQLite3.lib
+SafariTheme.lib
+icuin.lib
+icuuc.lib
+libdispatch.lib
+libicuin.lib
+libicuuc.lib
+libxml2.lib
+libxslt.lib
+pthreadVC2.lib
+zdll.lib
Websites/planet.webkit.org/planet/.gitattributes new file +1 -0
new file mode 100644
index 0000000..55db555
@@ -0,0 +1 @@
+LICENCE -crlf
Websites/webkit.org/blog/.gitattributes new file +3 -0
new file mode 100644
index 0000000..35ffd3a
@@ -0,0 +1,3 @@
+license.txt -crlf
+wp-config-sample.php -crlf
+wp-config.php -crlf
Websites/webkit.org/blog/wp-includes/images/crystal/.gitattributes new file +1 -0
new file mode 100644
index 0000000..346e00c
@@ -0,0 +1 @@
+license.txt -crlf
Websites/webkit.org/blog/wp-includes/js/scriptaculous/.gitattributes new file +1 -0
new file mode 100644
index 0000000..eb4ffe5
@@ -0,0 +1 @@
+MIT-LICENSE -crlf
Websites/webkit.org/blog/wp-includes/js/swfupload/plugins/.gitattributes new file +1 -0
new file mode 100644
index 0000000..7282a9a
@@ -0,0 +1 @@
+swfupload.speed.js -crlf
Websites/webkit.org/blog/wp-includes/js/tinymce/.gitattributes new file +1 -0
new file mode 100644
index 0000000..346e00c
@@ -0,0 +1 @@
+license.txt -crlf
Websites/webkit.org/perf/slickspeed/frameworks/.gitattributes new file +1 -0
new file mode 100644
index 0000000..f949e6f
@@ -0,0 +1 @@
+DomQuery.js -crlf
#1 lore raw
Quoted 7 lines · Jeff King

So we were sitting around chatting today about how slow "git status" is in the gigantic WebKit repository (because really, what else would one chat about?). Carlos noticed that git spends a lot of time in the gitignore code path. It turns out that the WebKit repository has a couple hundred excludes in the top-level .gitignore, many of which are for specific files deep in the repository.

Quoted 7 lines

Since these patterns are compared via fnmatch(), we have to process them linearly for each entry[1]. And since the patterns are at the top level, we check them for each of the ~180,000 files in the repository. So "git status" will do O(m*n) work, where "m" is the number of patterns and "n" is the number of files in the repository. And as a project grows over time, one might expect "m" to be some constant factor of "n". So this is really O(n^2) (albeit with some mitigating constant at the front).

Many months ago I noticed that as well, when somebody came to #git and complained that git status is slow (it toook *many* seconds for him). We tracked that down to the fact that his .gitignore contained hundreds of entries. He basically did git ls-files --other >> .gitignore, so his .gitignore included every single object file and all other build artefacts. I told him to use wildcards and git status became usable again.

tom

#2 lore raw
In reply to Jeff King
Quoted 8 lines · Jeff King

[1] ... But we could do better in git, too. fnmatch
patterns need to be examined linearly because of wildcards. But many patterns don't have wildcards, or the wildcards come much later in the pattern. There's no reason we couldn't preprocess the patterns into a data structure with fast lookup properties, grouped by non-wildcard prefixes (so seeing "foo/bar/*.baz", we could build a trie that lets us reject "other/directory" after only a single-character match).

It sounds like a good project for somebody who has three months working on full-time, especially if she can be helped with a good mentor. The result will reasonably be self-contained.