Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance of XmlDependencies IsDependenciesFile #602

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Commits on Feb 9, 2024

  1. Add test for XmlDependencies.IsDependenciesFile

    This commit records the current behaviour of the method before I make changes to try and optimize it.
    Christopher Yarbrough committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    85fa4e7 View commit details
    Browse the repository at this point in the history
  2. Improve XmlDependencies.IsDependenciesFile performance

    This simpler string manipulation checks the same logic as before but much faster in the context of a large project. If the OnPostprocessAllAssets callback is invoked multiple times with thousands of files, as can happen with non-trivial Unity projects, the regex call becomes quite expensive.
    
    For profiling data see: googlesamples#601
    Christopher Yarbrough committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    8b3b7fb View commit details
    Browse the repository at this point in the history
  3. Remove XmlDependencies.fileRegularExpressions

    Internally, only Dependencies.xml files are matched, so we can use the more performant file-matching pattern here.
    
    The public API remains unchanged and only supports regex for now.
    Christopher Yarbrough committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    dcae0f9 View commit details
    Browse the repository at this point in the history
  4. Move AndroidResolver tests into unit_tests directory

    Christopher Yarbrough committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    84074ef View commit details
    Browse the repository at this point in the history
  5. Add TODO item to build.gradle to fix Nunit tests for googlesamples#602

    Christopher Yarbrough committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    717d53d View commit details
    Browse the repository at this point in the history
  6. Remove FileMatchPattern delegate and replace with System.Func

    This was only added because I initially thought it would read better, but it also obscures the in and out types. Since there's no functional difference, I removed it again just to reduce the amount of custom code.
    Christopher Yarbrough committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    87f25bf View commit details
    Browse the repository at this point in the history
  7. Refactor IsDependenciesFile

    Christopher Yarbrough committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    22d1a09 View commit details
    Browse the repository at this point in the history
  8. Use NUnit 2.6.3 instead of 3.5.0 in AndroidResolverTests because the …

    …earlier one already exists in the project
    Christopher Yarbrough committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    167a3ce View commit details
    Browse the repository at this point in the history
  9. Rename AndroidResolverTests assembly to Google.AndroidResolverTests t…

    …o align with others
    Christopher Yarbrough committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    62b4583 View commit details
    Browse the repository at this point in the history
  10. Add comment to IsDependenciesFile

    Christopher Yarbrough committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    2bad7a8 View commit details
    Browse the repository at this point in the history