nextcloud/lib/public
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 Some php-cs fixes 2019-11-22 20:52:10 +01:00
Activity Update license headers 2019-12-05 15:38:45 +01:00
App Allow to force enable apps via CLI 2019-12-13 13:06:12 +01:00
AppFramework Allow non integer ids in Entity Mapper 2020-02-26 14:44:45 +01:00
Authentication Update license headers 2019-12-05 15:38:45 +01:00
BackgroundJob Update license headers 2019-12-05 15:38:45 +01:00
Broadcast/Events Update license headers 2019-12-05 15:38:45 +01:00
Calendar Update license headers 2019-12-05 15:38:45 +01:00
Capabilities 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 Update license headers 2019-12-05 15:38:45 +01:00
Console Update license headers 2019-12-05 15:38:45 +01:00
Contacts Update license headers 2019-12-05 15:38:45 +01:00
DB Update license headers 2019-12-05 15:38:45 +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 Merge pull request #18224 from nextcloud/bugfix/noid/direct-editing-path 2019-12-11 11:17:26 +01:00
Encryption Update license headers 2019-12-05 15:38:45 +01: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
Files_FullTextSearch/Model Update license headers 2019-12-05 15:38:45 +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 for 18 2019-12-20 09:23:25 +01:00
Http/Client Update license headers 2019-12-05 15:38:45 +01:00
L10N Update license headers 2019-12-05 15:38:45 +01:00
LDAP Update license headers 2019-12-05 15:38:45 +01:00
Lock Fix license headers 2020-01-13 14:23:49 +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
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 Update license headers 2019-12-05 15:38:45 +01:00
Remote Update license headers 2019-12-05 15:38:45 +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 Update license headers 2019-12-05 15:38:45 +01:00
Session/Exceptions Update license headers 2019-12-05 15:38:45 +01:00
Settings Update license headers 2019-12-05 15:38:45 +01:00
Share Update license headers for 18 2019-12-20 09:23:25 +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
User Update license headers for 18 2019-12-20 09:23:25 +01:00
WorkflowEngine Fix license headers 2020-01-13 14:23:49 +01:00
API.php Update license headers 2019-12-05 15:38:45 +01:00
App.php Update license headers 2019-12-05 15:38:45 +01:00
AutoloadNotAllowedException.php Update license headers 2019-12-05 15:38:45 +01:00
BackgroundJob.php Update license headers 2019-12-05 15:38:45 +01:00
Constants.php Update license headers 2019-12-05 15:38:45 +01:00
Defaults.php Update license headers 2019-12-05 15:38:45 +01:00
Files.php Update license headers 2019-12-05 15:38:45 +01:00
GroupInterface.php Update license headers 2019-12-05 15:38:45 +01:00
IAddressBook.php Update license headers 2019-12-05 15:38:45 +01:00
IAppConfig.php Update license headers 2019-12-05 15:38:45 +01:00
IAvatar.php Update license headers 2019-12-05 15:38:45 +01:00
IAvatarManager.php Update license headers 2019-12-05 15:38:45 +01:00
ICache.php Update license headers 2019-12-05 15:38:45 +01:00
ICacheFactory.php Update license headers 2019-12-05 15:38:45 +01:00
ICertificate.php Update license headers 2019-12-05 15:38:45 +01:00
ICertificateManager.php Update license headers 2019-12-05 15:38:45 +01:00
IConfig.php Update license headers 2019-12-05 15:38:45 +01:00
IContainer.php Update license headers 2019-12-05 15:38:45 +01:00
IDBConnection.php Update license headers 2019-12-05 15:38:45 +01:00
IDateTimeFormatter.php Update license headers 2019-12-05 15:38:45 +01:00
IDateTimeZone.php Update license headers 2019-12-05 15:38:45 +01:00
IEventSource.php Update license headers 2019-12-05 15:38:45 +01:00
IGroup.php Update license headers 2019-12-05 15:38:45 +01:00
IGroupManager.php Update license headers 2019-12-05 15:38:45 +01:00
IImage.php Update license headers 2019-12-05 15:38:45 +01:00
IInitialStateService.php Update license headers 2019-12-05 15:38:45 +01:00
IL10N.php Update license headers 2019-12-05 15:38:45 +01:00
ILogger.php Update license headers 2019-12-05 15:38:45 +01:00
IMemcache.php Update license headers 2019-12-05 15:38:45 +01:00
IMemcacheTTL.php Update license headers 2019-12-05 15:38:45 +01:00
INavigationManager.php Update license headers 2019-12-05 15:38:45 +01:00
IPreview.php Update license headers 2019-12-05 15:38:45 +01:00
IRequest.php Update license headers 2019-12-05 15:38:45 +01:00
ISearch.php Update license headers 2019-12-05 15:38:45 +01:00
IServerContainer.php Update license headers 2019-12-05 15:38:45 +01:00
ISession.php Update license headers 2019-12-05 15:38:45 +01:00
ITagManager.php Update license headers 2019-12-05 15:38:45 +01:00
ITags.php Make TAG_FAVORITE public 2020-02-12 15:11:58 +01:00
ITempManager.php Update license headers 2019-12-05 15:38:45 +01:00
IURLGenerator.php Update license headers 2019-12-05 15:38:45 +01:00
IUser.php Update license headers 2019-12-05 15:38:45 +01:00
IUserBackend.php Update license headers 2019-12-05 15:38:45 +01:00
IUserManager.php Update license headers 2019-12-05 15:38:45 +01:00
IUserSession.php Update license headers 2019-12-05 15:38:45 +01:00
Image.php Update license headers 2019-12-05 15:38:45 +01:00
PreConditionNotMetException.php Update license headers 2019-12-05 15:38:45 +01:00
SabrePluginEvent.php Update license headers 2019-12-05 15:38:45 +01:00
SabrePluginException.php Update license headers 2019-12-05 15:38:45 +01:00
Share.php Update license headers 2019-12-05 15:38:45 +01:00
Share_Backend.php Update license headers 2019-12-05 15:38:45 +01:00
Share_Backend_Collection.php Update license headers 2019-12-05 15:38:45 +01:00
Share_Backend_File_Dependent.php Update license headers 2019-12-05 15:38:45 +01:00
Template.php Update license headers 2019-12-05 15:38:45 +01:00
User.php Update license headers 2019-12-05 15:38:45 +01:00
UserInterface.php Update license headers 2019-12-05 15:38:45 +01:00
Util.php Update license headers 2019-12-05 15:38:45 +01:00