Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

[WIP] Dont read whole file into memory #30

Closed
wants to merge 2 commits into from
Closed

Conversation

IljaN
Copy link
Contributor

@IljaN IljaN commented Sep 24, 2018

Description

Copy streams instead of passing file_get_contents to file_put_content

Related Issue

Closes #28

Motivation and Context

Improve performance

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@IljaN IljaN added this to the development milestone Sep 24, 2018
@IljaN IljaN self-assigned this Sep 24, 2018
@IljaN IljaN requested a review from jvillafanez September 24, 2018 10:55
$source = $node->fopen('rb');
$target = @\fopen($path, 'wb');
if ($source === false || $target === false) {
throw new \RuntimeException("Error while writing file $path.");
Copy link
Member

Choose a reason for hiding this comment

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

🚫
Use a custom exception.

@IljaN
Copy link
Contributor Author

IljaN commented Oct 19, 2018

Obsoleted by #39

@IljaN IljaN closed this Oct 19, 2018
@IljaN IljaN deleted the dont_read_into_memory branch October 19, 2018 07:53
@PVince81 PVince81 modified the milestones: development, 0.0.1 Jan 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't read whole file in to memory on importing/exporting
3 participants