Skip to content

WIP: Adding class based property storage for File and Registry providers. - #7502

Closed
Staffan Gustafsson (powercode) wants to merge 2 commits into
PowerShell:masterfrom
powercode:FastProviderProperties
Closed

Staffan Gustafsson (powercode) wants to merge 2 commits into
PowerShell:masterfrom
powercode:FastProviderProperties

Conversation

@powercode

@powercode Staffan Gustafsson (powercode) commented Aug 11, 2018 •

Copy link
Copy Markdown
Collaborator

PR Summary

#7501

Using a ConditionalWeakTable to connect provider objects with objects specially crafted for faster and more efficient storage of the properties that we know beforehand will exist.

Adding classes FileSystemProviderProperties and RegistryProviderProperties that stores the properties, and exposes CodeProperty methods, and hooks to update the type system.

Adding a new virtual method in ProviderBase where providers can opt in to more efficient storage of properties.

Jason Shirk (@lzybkr) - I'd love if you can find the time to review this!

PR Checklist

@powercode Staffan Gustafsson (powercode) changed the title Adding class based property storage for File and Registry providers. WIP: Adding class based property storage for File and Registry providers. Aug 11, 2018
{
FileSystemProviderProperties.GetCodePropertiesTypeData(),
RegistryProviderProperties.GetCodePropertiesTypeData()
};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this in TypesV3_Ps1Xml class?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sure - I just hacked it in to get it in the same timing scope as the rest of the types.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, there is no longer a good reason to keep TypesV3_Ps1Xml separate from Types_PS1Xml.

The original idea was to make it easy to compare with the ps1xml files from V5, but they've diverged enough at this point that it doesn't matter.

/// <inheritdoc />
protected override bool TrySetCodeProperties(object item, string path)
{
if (PSObject.Base(item) is FileSystemInfo fileSystemInfo)

@iSazonov Ilya (iSazonov) Aug 13, 2018 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we enhance and use public enum ProviderCapabilities

@powercode Staffan Gustafsson (powercode) Aug 13, 2018 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good idea!

@stale

stale Bot commented Sep 12, 2018 •

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days.
Thank you for your contributions.
Community members are welcome to grab these works.

@stale stale Bot added Stale and removed Stale labels Sep 12, 2018
@stale

stale Bot commented Oct 13, 2018

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days.
Thank you for your contributions.
Community members are welcome to grab these works.

@stale stale Bot added Stale and removed Stale labels Oct 13, 2018
@stale

stale Bot commented Nov 15, 2018 •

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days.
Thank you for your contributions.
Community members are welcome to grab these works.

@stale stale Bot added Stale and removed Stale labels Nov 15, 2018
@stale

stale Bot commented Dec 15, 2018

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days.
Thank you for your contributions.
Community members are welcome to grab these works.

@stale stale Bot added Stale and removed Stale labels Dec 15, 2018
@stale

stale Bot commented Jan 15, 2019

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days.
Thank you for your contributions.
Community members are welcome to grab these works.

@stale stale Bot added the Stale label Jan 15, 2019
@stale

stale Bot commented Jan 26, 2019

Copy link
Copy Markdown

This PR has been automatically closed because it is stale. If you wish to continue working on the PR, please first update the PR, then reopen it.
Thanks again for your contribution.
Community members are welcome to grab these works.

@stale stale Bot closed this Jan 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants