nextcloud/lib
Robin Appelman 5ca1929e8c
Create SimpleFile only when writing the content
instead of first creating an empty file and then writing the content.

This solves the overhead of creating an empty file with the common pattern:

```php
$file = $simpleFilder->newFile('foo.txt');
$file->putContent('bar.txt');
```

roughly halving the number of storage and database operations that need to be done when creating a `SimpleFile`.

This is not automatically done with `File` because that has a more complex api which I'm more hesitant to touch.
Instead the `Folder::newFile` api has been extended to accept the content for the new file.

In my local testing, the overhead of first creating an empty file took about 20% of the time for preview generation

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-02-28 12:55:22 +01:00
..
composer Add event subscriber for transaction isolation level 2020-02-21 09:59:08 +01:00
l10n [tx-robot] updated from transifex 2020-02-28 02:18:36 +00:00
private Create SimpleFile only when writing the content 2020-02-28 12:55:22 +01:00
public Create SimpleFile only when writing the content 2020-02-28 12:55:22 +01:00
autoloader.php Update license headers 2019-12-05 15:38:45 +01:00
base.php Check that username and password are present. 2020-02-23 18:53:17 +01:00
versioncheck.php Update license headers 2019-12-05 15:38:45 +01:00