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

Introduce TaskParameterEventArgs #6155

Merged
merged 6 commits into from
Mar 4, 2021

Commits on Feb 26, 2021

  1. Introduce TaskParameterEventArgs.

    Instead of just logging a BuildMessageEventArgs with a list of all items and metadata concatenated into a large string (often 5 MB in size or more) it keeps a structured representation of items and metadata. TaskParameterEventArgs inherits from BuildMessageEventArgs and the Message implementation materializes the large string on demands. However when only the BinaryLogger is present the Message is never accessed, thus saving on allocations.
    
    It is instantiated in 5 locations: ItemGroup Include and Remove inside targets, task inputs, and two cases for task outputs.
    
    Storing smaller strings in the binlog results in very significant savings from string deduplication. A 22 MB binlog goes down to 3.5 MB in size. We're also seeing build speed improvements from 33 seconds to 30 seconds. Significant reduction in memory allocations since we no longer need to allocate the large strings and send them across the nodes.
    
    This also shares some extension methods for reading and writing things between the node packet serialization and binary logger. It also shares a new internal type, TaskItemData, used as a holder for deserialized items. The actual ProjectItemInstance.TaskItem is too heavyweight for this.
    
    Binary logger format version goes all the way to 11. The viewer already supports the new format. An additional benefit is that the viewer no longer has to parse the large text messages to recover structure, it will now be more reliable when reading multi-line properties, items and metadata values.
    KirillOsenkov committed Feb 26, 2021
    Configuration menu
    Copy the full SHA
    3d9cca3 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2021

  1. Touch ItemGroupLoggingHelper from LoggingService.

    This is needed to ensure the static constructor runs.
    KirillOsenkov committed Mar 1, 2021
    Configuration menu
    Copy the full SHA
    ec75421 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f13f0bd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e1ca276 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2021

  1. Add copyright headers.

    Rename SmallDictionary -> ArrayDictionary.
    KirillOsenkov committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    e12a5ea View commit details
    Browse the repository at this point in the history
  2. Code review feedback.

    KirillOsenkov committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    ffc3113 View commit details
    Browse the repository at this point in the history