Skip to content

WIP: Adding typed import of Csv - #8860

Closed
Staffan Gustafsson (powercode) wants to merge 1 commit into
PowerShell:masterfrom
powercode:TypedImportCsv
Closed

Staffan Gustafsson (powercode) wants to merge 1 commit into
PowerShell:masterfrom
powercode:TypedImportCsv

Conversation

@powercode

@powercode Staffan Gustafsson (powercode) commented Feb 10, 2019 •

Copy link
Copy Markdown
Collaborator

PR Summary

Adding ResultType parameter to Import-CSV, and uses that to drastically improve both the import time and memory usage.

This is still a work in progress, but I thought I might let people try it out or comment on the design before we start a regular review.

PR Context

On a csv with half a million rows and 200 columns of random integers

Destination Time Memory used
PSObject 01:34 19Gb
class with int props 01:02 490Mb
class with string props 00:10 4.2Gb

PR Checklist

@bergmeister

Copy link
Copy Markdown
Contributor

Do you think it would make sense to let the cmdlet create a default type of the ResultType based on the CSV header (i.e. create a default class with string properties for-each column)? This way the average consumer would still benefit from it without having to specify complex parameters and defining the custom class would then be an additional, optional optimisation on top of it?

@powercode

Copy link
Copy Markdown
Collaborator Author

It may. But I think we should have that discussion in the issue :) #8862

@stale

stale Bot commented Mar 13, 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 Mar 13, 2019
@stale

stale Bot commented Mar 23, 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 Mar 23, 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.

2 participants