nextcloud/lib/private
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
..
Accounts Update license headers for 18 2019-12-20 09:23:25 +01:00
Activity Update license headers 2019-12-05 15:38:45 +01:00
App add hub bundle for easy post-installation 2020-01-26 21:23:42 +01:00
AppFramework Hardcode Talk namespace to fix install due to global route 2020-02-14 12:34:13 +01:00
Archive Update license headers 2019-12-05 15:38:45 +01:00
Authentication Fix license headers 2020-01-13 14:23:49 +01:00
Avatar Fix tests after #18745 2020-01-27 20:17:16 +01:00
BackgroundJob Make sure to catch php errors during job execution 2020-01-31 16:04:04 +01:00
Broadcast/Events Update license headers 2019-12-05 15:38:45 +01:00
Cache Update license headers 2019-12-05 15:38:45 +01:00
Calendar Update license headers 2019-12-05 15:38:45 +01:00
Collaboration Update license headers for 18 2019-12-20 09:23:25 +01:00
Command Update license headers 2019-12-05 15:38:45 +01:00
Comments for the DB ot pick an index specify the object_type 2020-02-03 16:17:25 +01:00
Console Update license headers 2019-12-05 15:38:45 +01:00
Contacts/ContactsMenu Do not encode contacts menu mailto links 2020-01-28 14:57:45 +01:00
DB Add event subscriber for transaction isolation level 2020-02-21 09:59:08 +01:00
Dashboard Update license headers 2019-12-05 15:38:45 +01:00
Diagnostics Update license headers 2019-12-05 15:38:45 +01:00
DirectEditing use `nodeExists` instead of catching exceptions 2020-01-14 11:03:14 +01:00
Encryption Keep the modification time during decryptFile 2020-02-01 16:20:33 +11:00
EventDispatcher Allow to remove listeners 2020-02-27 11:04:23 +01:00
Federation Update license headers 2019-12-05 15:38:45 +01:00
Files Create SimpleFile only when writing the content 2020-02-28 12:55:22 +01:00
FullTextSearch Update license headers 2019-12-05 15:38:45 +01:00
GlobalScale Update license headers 2019-12-05 15:38:45 +01:00
Group Update license headers 2019-12-05 15:38:45 +01:00
Hooks Update license headers for 18 2019-12-20 09:23:25 +01:00
Http Update license headers 2019-12-05 15:38:45 +01:00
IntegrityCheck Update license headers 2019-12-05 15:38:45 +01:00
L10N Update license headers 2019-12-05 15:38:45 +01:00
Lock Update license headers 2019-12-05 15:38:45 +01:00
Lockdown Update license headers 2019-12-05 15:38:45 +01:00
Log always require a message paramter for data logging 2020-01-28 13:00:13 +01:00
Mail Update license headers 2019-12-05 15:38:45 +01:00
Memcache Update license headers 2019-12-05 15:38:45 +01:00
Migration Update license headers 2019-12-05 15:38:45 +01:00
Notification Update license headers for 18 2019-12-20 09:23:25 +01:00
OCS Update license headers 2019-12-05 15:38:45 +01:00
Preview Proper text previews 2020-01-14 22:38:04 +00:00
Remote Update license headers 2019-12-05 15:38:45 +01:00
Repair Always set the generated flag to false when an avatar is being set 2019-12-20 15:34:36 +01:00
RichObjectStrings Update license headers 2019-12-05 15:38:45 +01:00
Route Update license headers 2019-12-05 15:38:45 +01:00
Search Update license headers 2019-12-05 15:38:45 +01:00
Security Add Argon2id support 2020-02-07 07:52:33 +01:00
Session Only send samesite cookies 2020-02-06 15:24:35 +01:00
Settings Move Admin Settings also to info.xml 2020-01-31 16:55:17 +01:00
Setup Check the new connection on setup like with PostgreSQL and Oracle 2020-02-05 13:55:16 +01:00
Share Update license headers 2019-12-05 15:38:45 +01:00
Share20 Strip of users home path from share api message 2020-02-20 14:56:58 +01:00
Support Update license headers 2019-12-05 15:38:45 +01:00
SystemTag Update license headers 2019-12-05 15:38:45 +01:00
Tagging Update license headers 2019-12-05 15:38:45 +01:00
Template Migrate leafo/scssphp to scssphp/scssphp 2020-01-23 14:52:16 +01:00
Updater when we receive intentional empty whats new info, do not try to show it 2020-02-13 22:03:44 +01:00
User Add typed events for all user hooks and legacy events 2019-12-11 10:00:24 +01:00
legacy Allow to force register the namespace 2020-01-13 15:15:50 +01:00
AllConfig.php Update license headers 2019-12-05 15:38:45 +01:00
AppConfig.php Update license headers 2019-12-05 15:38:45 +01:00
CapabilitiesManager.php Update license headers 2019-12-05 15:38:45 +01:00
Color.php Update license headers 2019-12-05 15:38:45 +01:00
Config.php Update license headers 2019-12-05 15:38:45 +01:00
ContactsManager.php Update license headers 2019-12-05 15:38:45 +01:00
DatabaseException.php Update license headers 2019-12-05 15:38:45 +01:00
DatabaseSetupException.php Update license headers 2019-12-05 15:38:45 +01:00
DateTimeFormatter.php Update license headers 2019-12-05 15:38:45 +01:00
DateTimeZone.php Update license headers 2019-12-05 15:38:45 +01:00
ForbiddenException.php Update license headers 2019-12-05 15:38:45 +01:00
HintException.php Update license headers 2019-12-05 15:38:45 +01:00
InitialStateService.php Update license headers 2019-12-05 15:38:45 +01:00
Installer.php disable timeout on app install via cli 2020-02-12 16:52:45 +01:00
LargeFileHelper.php Update license headers 2019-12-05 15:38:45 +01:00
Log.php always require a message paramter for data logging 2020-01-28 13:00:13 +01:00
MemoryInfo.php Update license headers 2019-12-05 15:38:45 +01:00
NaturalSort.php Update license headers 2019-12-05 15:38:45 +01:00
NaturalSort_DefaultCollator.php Update license headers 2019-12-05 15:38:45 +01:00
NavigationManager.php Update license headers 2019-12-05 15:38:45 +01:00
NeedsUpdateException.php Update license headers 2019-12-05 15:38:45 +01:00
NotSquareException.php Update license headers 2019-12-05 15:38:45 +01:00
PreviewManager.php Update license headers 2019-12-05 15:38:45 +01:00
PreviewNotAvailableException.php Update license headers 2019-12-05 15:38:45 +01:00
RedisFactory.php Update license headers 2019-12-05 15:38:45 +01:00
Repair.php Always set the generated flag to false when an avatar is being set 2019-12-20 15:34:36 +01:00
RepairException.php Update license headers 2019-12-05 15:38:45 +01:00
Search.php Update license headers 2019-12-05 15:38:45 +01:00
Server.php disable timeout on app install via cli 2020-02-12 16:52:45 +01:00
ServerContainer.php Update license headers 2019-12-05 15:38:45 +01:00
ServerNotAvailableException.php Update license headers 2019-12-05 15:38:45 +01:00
ServiceUnavailableException.php Update license headers 2019-12-05 15:38:45 +01:00
Setup.php Allow to serve static mp4 directly 2020-02-12 10:36:59 +01:00
Streamer.php Update license headers for 18 2019-12-20 09:23:25 +01:00
SubAdmin.php Update license headers 2019-12-05 15:38:45 +01:00
SystemConfig.php Update license headers 2019-12-05 15:38:45 +01:00
TagManager.php Update license headers 2019-12-05 15:38:45 +01:00
Tags.php Make TAG_FAVORITE public 2020-02-12 15:11:58 +01:00
TempManager.php Update license headers 2019-12-05 15:38:45 +01:00
TemplateLayout.php Update license headers 2019-12-05 15:38:45 +01:00
URLGenerator.php Update license headers 2019-12-05 15:38:45 +01:00
Updater.php Update license headers 2019-12-05 15:38:45 +01:00