Commit Graph
420 Commits
Author SHA1 Message Date
Kenneth SkovhedeandGitHub f8cbd206e0 Merge pull request #3568 from warwickmm/default_excludes_performance
Improve performance of default excludes filters
2018-12-29 09:11:45 +01:00
Kenneth Hsu 7a106df094 Improve performance of default excludes filters.
Previously, the FilterExpression.Expand method would forward the filter
group name to the FilterEntry constructor, which would combine the
group's patterns into one large regex filter.  This would result in a
significant decrease in performance, as the regex filters are much
slower than the wildcard filters.

Instead, we can first expand the filter group into its constituent
patterns before presenting them to the FilterEntry constructor.  This
preserves their wildcard nature and allows us to take advantage of
faster filtering matching algorithms.

This addresses issue #3395.
2018-12-28 22:07:59 -08:00
Kenneth Hsu 139420a664 Improve performance of wildcard filters.
The mono profiler indicated that a large percentage of the time was
spent allocating the inputPosStack and patternPosStack arrays.  By
replacing these with Stacks, we can avoid this unnecessary overhead.
2018-12-28 17:33:46 -08:00
Kenneth Hsu faf2b0df47 Remove helper method that creates regex filter.
This will discourage the creation of default regex filters, which
exhibit poor performance.
2018-12-20 19:37:36 -08:00
Kenneth Hsu 340d7803cb Convert regex pattern to wildcard in default excludes group.
This provides a workaround for the poor performance of the default
excludes group exhibited by regex filters.  While this wildcard pattern
will potentially exclude more files than the previous regex pattern, in
practice this should not often be the case.

This does not resolve the performance issue of the regex filters.
However, I think in general we should try to avoid expensive
application-specific filters since these will affect the performance for
all users that use the default excludes group, whether the application
is present or not.

This concerns issue #3395.
2018-12-17 18:14:43 -08:00
Kenneth Hsu 8dd3aeaf26 Use invariant culture in calls to ToLower and ToUpper. 2018-12-11 21:21:07 -08:00
Kenneth Hsu 308410650b Remove write-only LinkedSubStream.Position implementation.
The LinkedSubStream class is abstract, and all derived classes implement
a getter and a setter.
2018-12-09 21:42:40 -08:00
Kenneth Hsu b363be1db9 Remove unnecessary newline. 2018-11-18 17:04:41 -08:00
Kenneth Hsu e88b83bf92 Remove unnecessary method overload. 2018-11-18 17:00:46 -08:00
Kenneth Hsu daa8ed7d0f Remove unnecessary lambda expression.
Since the filter is always empty, every folder should be inspected when
enumerating the filesystem entries.
2018-11-18 16:58:46 -08:00
Kenneth Hsu fb7ddf59f2 Remove unnecessary method overload. 2018-11-18 16:54:30 -08:00
Kenneth Hsu 94202ba038 Remove unnecessary method overload. 2018-11-18 16:53:07 -08:00
Kenneth Hsu e03ba7c5d8 Remove unnecessary method overload. 2018-11-18 16:49:38 -08:00
Kenneth Hsu d4584b8443 Remove unnecessary method overload. 2018-11-18 16:48:53 -08:00
Kenneth Hsu 722ff0cca5 Remove unused method parameter. 2018-11-18 16:47:59 -08:00
Kenneth Skovhede 1efaf23042 Updated build tools to use the new Common library 2018-11-13 09:44:27 +01:00
verhoek ab12be6bbd Renamed IsClientLinux to IsClientPosix . 2018-11-03 09:26:04 +01:00
verhoek 72b1f6b6f8 Updated project files. 2018-11-02 22:45:07 +01:00
verhoek 8bb406cd15 Migrated to use the platform class. 2018-11-02 22:17:16 +01:00
verhoek b2cc18426c Renamed Library.IO to Library.Common.IO.
Moved basic Platform functions to Library.Common.Platform.
Turned IO_OS into property within Library.Common.
2018-11-02 21:34:07 +01:00
verhoek 1275f14405 Replaced DirectorySeparatorChar.ToString() calls. 2018-11-02 17:45:00 +01:00
verhoek dd74245b75 Handled GetFiles calls at risky spots in combination with PathTooLongExceptions. 2018-10-30 17:16:13 +01:00
verhoek a90f577624 Redirected GetDirectories calls to Library.IO's version. 2018-10-30 13:38:25 +01:00
verhoek 4d8155fa43 Merge remote-tracking branch 'origin/master' into issue/3311 2018-10-29 12:13:25 +01:00
verhoek bc053df294 Moved basic IO helper functions to Library.IO. 2018-10-27 12:17:07 +02:00
Kenneth Hsu 2d7566e909 Fix typo in regex filter pattern.
The extension for these Firefox files should be .sqlite (with one 'l').
2018-10-26 20:00:07 -07:00
verhoek 40dc6da81d Created separate package for io wrapper. 2018-10-25 20:01:55 +02:00
Kenneth Hsu 9e0b031fee Remove unused members. 2018-10-15 21:20:30 -07:00
Kenneth Hsu 6b8dc6e8b8 Rename parameter to match XML documentation.
The use of camel case is also more consistent with the surrounding
style.
2018-10-13 20:45:13 -07:00
Kenneth Hsu d72128ec83 Remove unused method parameters. 2018-10-06 15:09:43 -07:00
Kenneth Hsu 8902da39f2 Undo removal of method parameters.
This should be done on a separate branch for a different pull request.
2018-09-29 10:44:05 -07:00
Kenneth Hsu 9ce1e807c7 Remove unused variables and fields. 2018-09-29 10:41:27 -07:00
Kenneth SkovhedeandGitHub 7330aebaeb Merge pull request #3394 from warwickmm/remove_unnecessary_indirection
Use built-in method to expand environment variables
2018-09-28 22:25:46 +02:00
Kenneth Hsu d4692e2d35 Use built-in method to expand environment variables.
After we removed the tilde expansion in revision c9aa6cf5fb ("Avoid
performing tilde expansion"), the Utility.ExpandEnvironmentVariables
method simply called System.Environment.ExpandEnvironmentVariables.  We
can simplify the code by just referencing the built-in method directly.
2018-09-22 19:59:46 -07:00
Kenneth Hsu a325a8e0e7 Fix XML documentation to more accurately reflect behavior. 2018-09-22 10:19:45 -07:00
Kenneth Hsu 67871a76ed Fix bug. Append separator when string ends with same separator.
Previously, the replacement would occur if the provided string did not
end with the platform-dependent directory separator.  However, this
utility method is often used to append a trailing slash to URL
specifiers.
2018-09-22 10:19:45 -07:00
Kenneth Hsu 0d23302220 Use ordinal case-insensitive comparison instead of ToLower. 2018-09-19 15:21:59 -07:00
Kenneth Hsu b45c41026e Use ordinal file path comparisons.
This addresses issue #3342.
2018-08-30 21:52:02 -07:00
Kenneth SkovhedeandGitHub 05059e3859 Merge pull request #3329 from warwickmm/refactor/remove_unused_utilities
Remove unused members from Utility class
2018-08-29 11:27:33 +02:00
Kenneth Skovhede 2ec203cabe Removed Task types and the TaskReader property from serialized results, as they have no usable serialized format 2018-08-08 11:59:20 +02:00
Kenneth Hsu 6b521691ce Remove unused ENVIRONMENT_VARIABLE_MATCHER_LINUX property.
This was added in revision 0b442ecdc6, but no usages could be found.  A
potential use-case is mentioned in a comment, so the implementation was
moved to the comment.
2018-08-02 21:40:51 -07:00
Kenneth Hsu 79f143e84a Remove unused ToUnixTimestamp utility method.
This was added in revision 6255572c25 ("Added a timestamp value to the
end of dates in the report output for easier parsing"), but no usages
could be found.
2018-08-02 21:36:32 -07:00
Kenneth Hsu f2b682e94f Remove unused Base64UrlDecode utility method.
This was added in revision aca4ed95cc ("More work on the block hash"),
but no usages could be found.
2018-08-02 21:36:32 -07:00
Kenneth Hsu a1a4bd8b90 Remove unused ReplaceFile utility method.
This was added in revision a0521da54d ("Initial version of the new
block-based storage format"), but no usages could be found.
2018-08-02 21:36:29 -07:00
Kenneth Hsu da3cf6d2b3 Remove unused DefaultCulture utility property.
Usages were removed in revision 2264c07f3b ("Removed unused files").
2018-08-02 21:36:25 -07:00
Kenneth Hsu 70b0d093fe Remove unused CalculateHash utility method.
Usages were removed in revision 3ff2f1eb98.
2018-08-02 21:36:20 -07:00
Kenneth Hsu c3cda5dc58 Remove unused IsValidHostname utility method.
Usages were removed in revision 62c75d9af9 ("Removed all informs code
(no more 1.3.x UI)").
2018-08-02 21:29:09 -07:00
Kenneth Hsu c7f4bcd0d3 Remove unused LocateFileInSystemPath utility method.
Usages were removed in revision 62c75d9af9 ("Removed all informs code
(no more 1.3.x UI)").
2018-08-02 21:27:25 -07:00
Kenneth Hsu 54c4f9224d Allow tasks to complete on any thread when context is irrelevant.
When the code following the await can be executed on any thread, it's
recommended to use ConfigureAwait(false) to avoid unnecessary context
switching and potential deadlocks.
2018-06-21 19:28:27 -07:00
Kenneth SkovhedeandGitHub db1bf986be Merge pull request #3267 from verhoek/fix/subprocess_readkey
Fix - Console.ReadKey for encryption passphrase
2018-06-15 09:10:54 +02:00