GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — load modules concurrently #4545 by roryc89 · Pull Request #4549 · purescript/purescript

Conversation

@roryc89

@roryc89 roryc89 commented Aug 1, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Description of the change

On large projects loading the modules concurrently lowers memory usage substantially. Should help address #4545

Checklist:

Relevant checklist points addressed in #4546

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jamesdbrock and rtxanson reacted with eyes emoji
All reactions
  • 👀 2 reactions
roryc89 added 2 commits August 1, 2024 14:46
@roryc89
load modules concurrently purescript#4545
92fb93e
@roryc89
read ide files concurrently
6fb43a4
f-f
f-f approved these changes Aug 23, 2024
View reviewed changes
@cakekindel

cakekindel commented Sep 21, 2024

Copy link
Copy Markdown

@f-f anything blocking merge here? this change looks lovely

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@f-f

f-f commented Sep 21, 2024

Copy link
Copy Markdown
Member

We'll need another review from the core team - could anyone take a look?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rhendric
rhendric reviewed Sep 21, 2024
View reviewed changes

@rhendric rhendric left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits aside, I'm surprised that this is reported to decrease memory use because my understanding is that mapConcurrently will spawn every one of these tasks at once. Has that been confirmed on very large projects? What about consumption of other resources—open file handles or something?

I'd be more comfortable with this if we used primitives like pooledMapConcurrently instead. OTOH, I don't do much maintenance of the Ide modules so if the team members who do are happy with this I won't block it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

f-f reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread src/Language/PureScript/Ide.hs
import Language.PureScript.Ide.Usage (findUsages)
import System.Directory (getCurrentDirectory, getDirectoryContents, doesDirectoryExist, doesFileExist)
import System.FilePath ((</>), normalise)
import Control.Concurrent.Async.Lifted (mapConcurrently, mapConcurrently_)

@rhendric rhendric Sep 21, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: insert into the imports in alphabetical order, please.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/Language/PureScript/Ide/SourceFile.hs
Comment on lines +32 to +33
import Control.Concurrent.Async.Lifted (mapConcurrently)
import Control.Monad.Trans.Control (MonadBaseControl)

@rhendric rhendric Sep 21, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same nit.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/Language/PureScript/Ide/Types.hs
import Language.PureScript qualified as P
import Language.PureScript.Errors.JSON qualified as P
import Language.PureScript.Ide.Filter.Declaration (DeclarationType(..))
import Control.Monad.Trans.Control (MonadBaseControl)

@rhendric rhendric Sep 21, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same nit.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rhendric

rhendric commented Sep 21, 2024

Copy link
Copy Markdown
Member

Also, I think this does merit its own changelog entry.

f-f and roryc89 reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@rhendric rhendric rhendric left review comments
@f-f f-f f-f approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@roryc89 @cakekindel @f-f @rhendric
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.