Skip to content

Commit

Permalink
[feature/mem-optimizations] Memory usage optimizations (#1416)
Browse files Browse the repository at this point in the history
* - remove direct usage of OCCoreManager.shared.memoryConfiguration (API has been removed, memory configuration now directly managed by SDK's OCPlatform)

* Configuration documentation updated

* Update SDK reference

---------

Co-authored-by: felix-schwarz <[email protected]>
Co-authored-by: Matthias Hühne <[email protected]>
  • Loading branch information
3 people authored Jan 21, 2025
1 parent fea7fed commit 14a72b6
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 44 deletions.
27 changes: 0 additions & 27 deletions doc/CONFIGURATION.json
Original file line number Diff line number Diff line change
Expand Up @@ -662,20 +662,6 @@
"status" : "advanced",
"type" : "stringArray"
},
{
"autoExpansion" : "none",
"category" : "OAuth2",
"categoryTag" : "oauth2",
"classIdentifier" : "authentication-oauth2",
"className" : "OCAuthenticationMethodOAuth2",
"defaultValue" : false,
"description" : "Send Client ID and Client Secret in the body of POST requests to the token endpoint. As per RFC 6749 section 2.3.1, this should only be used if the token endpoint does not support receiving these via Basic authentication.",
"flatIdentifier" : "authentication-oauth2.post-client-id-and-secret",
"key" : "post-client-id-and-secret",
"label" : "authentication-oauth2.post-client-id-and-secret",
"status" : "advanced",
"type" : "bool"
},
{
"autoExpansion" : "none",
"category" : "Authentication",
Expand Down Expand Up @@ -726,19 +712,6 @@
"status" : "supported",
"type" : "bool"
},
{
"autoExpansion" : "none",
"category" : "Authentication",
"categoryTag" : "authentication",
"classIdentifier" : "authentication",
"className" : "OCAuthenticationMethod",
"description" : "Overrides whether the default WebDAV endpoint should be probed to detect available authentication methods. By default, the necessity for this is determined dynamically.",
"flatIdentifier" : "authentication.skip-www-authenticate-checks",
"key" : "skip-www-authenticate-checks",
"label" : "authentication.skip-www-authenticate-checks",
"status" : "supported",
"type" : "bool"
},
{
"autoExpansion" : "none",
"category" : "Bookmarks",
Expand Down
12 changes: 0 additions & 12 deletions doc/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,6 @@ tag::authentication[]
|Indicates whether the app should ask iOS for a private authentication (web) session for OAuth2 or OpenID Connect. Private authentication sessions do not share cookies and other browsing data with the user's normal browser. Apple only promises that [this setting](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession/3237231-prefersephemeralwebbrowsersessio) will be honored if the user has set Safari as default browser.
|supported `candidate`

|authentication.skip-www-authenticate-checks
|bool
|
|Overrides whether the default WebDAV endpoint should be probed to detect available authentication methods. By default, the necessity for this is determined dynamically.
|supported `candidate`

|===
end::authentication[]

Expand Down Expand Up @@ -1560,12 +1554,6 @@ tag::oauth2[]
|Omit Authorization Request Parameters - parameter names provided here are omitted from OAuth2 authorization requests.
|advanced `candidate`

|authentication-oauth2.post-client-id-and-secret
|bool
|`false`
|Send Client ID and Client Secret in the body of POST requests to the token endpoint. As per RFC 6749 section 2.3.1, this should only be used if the token endpoint does not support receiving these via Basic authentication.
|advanced `candidate`

|authentication-oauth2.oa2-expiration-override-seconds
|int
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class DocumentActionViewController: FPUIActionExtensionViewController {
CollectionViewCellProvider.registerStandardImplementations()
CollectionViewSupplementaryCellProvider.registerStandardImplementations()

OCCoreManager.shared.memoryConfiguration = .minimum // Limit memory usage
OCHTTPPipelineManager.setupPersistentPipelines() // Set up HTTP pipelines

OCItem.registerIcons()
Expand Down
2 changes: 0 additions & 2 deletions ownCloud File Provider/FileProviderExtension.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ - (instancetype)init

NSDictionary *bundleInfoDict = [[NSBundle bundleForClass:[FileProviderExtension class]] infoDictionary];

OCCoreManager.sharedCoreManager.memoryConfiguration = OCCoreMemoryConfigurationMinimum;

OCAppIdentity.sharedAppIdentity.appIdentifierPrefix = bundleInfoDict[@"OCAppIdentifierPrefix"];
OCAppIdentity.sharedAppIdentity.keychainAccessGroupIdentifier = bundleInfoDict[@"OCKeychainAccessGroupIdentifier"];
OCAppIdentity.sharedAppIdentity.appGroupIdentifier = bundleInfoDict[@"OCAppGroupIdentifier"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class ShareExtensionViewController: EmbeddingViewController, Themeable {
ShareExtensionViewController._servicesHaveBeenSetup = true

// Setup services
OCCoreManager.shared.memoryConfiguration = .minimum // Limit memory usage
OCHTTPPipelineManager.setupPersistentPipelines() // Set up HTTP pipelines

if AppLockManager.supportedOnDevice {
Expand Down

0 comments on commit 14a72b6

Please sign in to comment.