Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
perf(server): don't create temp file on each file download
Browse files Browse the repository at this point in the history
  • Loading branch information
John Doe committed Jan 6, 2016
1 parent 65ea511 commit 8700df6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ final class LocalFileStorageAdapter(_system: ActorSystem)
persist.FileRepo.find(id) flatMap {
case Some(file) DBIO.from(for {
file getFile(file.id, file.name)
tmpDir Future(File.newTempDir())
copy Future(file.copyTo(tmpDir / file.name))
} yield Some(copy.toJava))
} yield Some(file.toJava))
case None DBIO.successful(None)
}

Expand Down
1 change: 1 addition & 0 deletions actor-server/notes/1.0.85.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Bug fixes
===

* Reduce GC overhead caused by Http Routes controlled by hooks
* Don't create temp file on each file download

Packaging
===
Expand Down

0 comments on commit 8700df6

Please sign in to comment.