You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "chibenwa (via GitHub)" <gi...@apache.org> on 2024/01/09 08:01:12 UTC
[PR] JAMES-3953 Performance enhancements [james-project]
chibenwa opened a new pull request, #1906:
URL: https://github.com/apache/james-project/pull/1906
Avoid partial reads and array concatenations.
CF: https://github.com/linagora/james-project/pull/5032
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-3953 Performance enhancements [james-project]
Posted by "vttranlina (via GitHub)" <gi...@apache.org>.
vttranlina commented on PR #1906:
URL: https://github.com/apache/james-project/pull/1906#issuecomment-1894812345
> @vttranlina I think the perf tests you did for choosing the default BlobStoreDAO are invalidated by this change.
>
> Don't you mind bench again this VS PGBlobStore?

The gap between min and max of Postgres is very high
postgres: https://vttranlina.github.io/gatling_20240117/postgres/index.html
file: https://vttranlina.github.io/gatling_20240117/file/index.html
My screnario
```
export DURATION=7
export USER_COUNT=3000
export MAX_DURATION=16
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-3953 Performance enhancements [james-project]
Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael merged PR #1906:
URL: https://github.com/apache/james-project/pull/1906
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-3953 Performance enhancements [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #1906:
URL: https://github.com/apache/james-project/pull/1906#issuecomment-1893993557
@vttranlina I think the perf tests you did for choosing the default BlobStoreDAO are invalidated by this change.
Don't you mind bench again this VS PGBlobStore?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-3953 Performance enhancements [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on code in PR #1906:
URL: https://github.com/apache/james-project/pull/1906#discussion_r1453596431
##########
server/blob/blob-file/src/main/java/org/apache/james/blob/file/FileBlobStoreDAO.java:
##########
@@ -97,13 +95,23 @@ public Mono<InputStream> readReactive(BucketName bucketName, BlobId blobId) {
@Override
public Mono<byte[]> readBytes(BucketName bucketName, BlobId blobId) {
- return readReactive(bucketName, blobId)
- .map(Throwing.<InputStream, byte[]>function(IOUtils::toByteArray).sneakyThrow());
+ return Mono.fromCallable(() -> {
+ File bucketRoot = getBucketRoot(bucketName);
+ File blob = new File(bucketRoot, blobId.asString());
+ return FileUtils.readFileToByteArray(blob);
+ }).onErrorResume(NoSuchFileException.class, e -> Mono.error(new ObjectNotFoundException(String.format("Cannot locate %s within %s", blobId.asString(), bucketName.asString()), e)))
+ .subscribeOn(Schedulers.boundedElastic());
}
@Override
public Mono<Void> save(BucketName bucketName, BlobId blobId, byte[] data) {
- return save(bucketName, blobId, new ByteArrayInputStream(data));
+ Preconditions.checkNotNull(data);
+ File bucketRoot = getBucketRoot(bucketName);
+ File blob = new File(bucketRoot, blobId.asString());
Review Comment:
Needs to be wrapped in a mono....
-> Beginner mistake!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-3953 Performance enhancements [james-project]
Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael commented on PR #1906:
URL: https://github.com/apache/james-project/pull/1906#issuecomment-1894880136
https://ci-builds.apache.org/job/james/job/ApacheJames/job/PR-1906/8/
Related or not? I've seen lots of instability on those tests around those changes for the past few days
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org