Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TaskCopyLocalFrontendFiles#copyLocalResources(File, File, String... ) takes a long time using Windows-OS #19866

Closed
thomasharre opened this issue Sep 2, 2024 · 2 comments · Fixed by #19894

Comments

@thomasharre
Copy link

Description of the bug

I'm using a windows pc and have noticed, that starting up our app takes longer than my colleges with mac.
The method com.vaadin.flow.server.frontend.TaskCopyLocalFrontendFiles#copyLocalResources takes up to a minute on windows and only 5 seconds on OSX.

We have found out, that the part that takes long ist what was added with #12711 . To be precise the code lines:
try (Stream<Path> fileStream = Files .walk(Paths.get(target.getPath()))) { // used with try-with-resources as defined in walk API note fileStream.filter(file -> !Files.isWritable(file)).forEach( filePath -> filePath.toFile().setWritable(true)); }

Expected behavior

Could you please add an option/property to deactive the functionality of setting all files writeable.
None of our files are readonly and this is costing our developers lots of time.

Minimal reproducible example

not sure

Versions

  • Vaadin / Flow version: 24.4.4
  • Java version: 17.0.9_9
  • OS version: Windows 10 Pro 10.0.19045
  • IDE (if applicable): IDEA 2024.1.4
mcollovati pushed a commit that referenced this issue Sep 6, 2024
…g of time (#19894)

Allows to skip setting writable flag on copied files by providing the vaadin.frontend.disableWritableFlagCheckOnCopy system property.
This may improve performance in certain scenarios with Windows OS.

Fixes #19866
@github-project-automation github-project-automation bot moved this from Inbox (needs triage) to Done / Pending Release in Vaadin Flow enhancements backlog (Vaadin 10+) Sep 6, 2024
vaadin-bot pushed a commit that referenced this issue Sep 6, 2024
…g of time (#19894)

Allows to skip setting writable flag on copied files by providing the vaadin.frontend.disableWritableFlagCheckOnCopy system property.
This may improve performance in certain scenarios with Windows OS.

Fixes #19866
vaadin-bot added a commit that referenced this issue Sep 6, 2024
…g of time (#19894) (#19906)

Allows to skip setting writable flag on copied files by providing the vaadin.frontend.disableWritableFlagCheckOnCopy system property.
This may improve performance in certain scenarios with Windows OS.

Fixes #19866

Co-authored-by: Tatu Lund <[email protected]>
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.5.0.alpha16 and is also targeting the upcoming stable 24.5.0 version.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.4.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment