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

class lib: don't post "cleaning up temp synthdefs" if no SynthDefs are being cleaned up #2629

Merged
merged 2 commits into from
Jan 12, 2017

Conversation

nhthn
Copy link
Contributor

@nhthn nhthn commented Jan 10, 2017

Most users use SynthDefs in memory, so there are no SynthDef files to be cleaned. This commit suppresses the "cleaning up temp synthdefs" message if it's not doing anything. I also capitalized "SynthDefs" and expanded "temp" to "temporary."

As part of an effort to clean up initial post window output, this commit causes the "Cleaning up temp synthdefs..." post window output to be suppressed if there are no temporary SynthDefs to clean up. For most users, this gets rid of the message entirely, since most SynthDefs today are done in memory.

It also revises the message to "Cleaning up temporary SynthDefs...".
@nhthn nhthn added the comp: class library SC class library label Jan 10, 2017
@nhthn nhthn added this to the 3.9 milestone Jan 10, 2017
Copy link
Contributor

@jamshark70 jamshark70 left a comment

Choose a reason for hiding this comment

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

I would change line 23 as well: having saved the result of pathMatch(path) in a variable, it's wasted effort to do it again.

For that matter, why is the do not inside the if branch? If match is empty, sure, do is a no-op... but in that case, it's redundant to call it (especially since we've just checked).

How about printing how many temp SynthDefs were cleaned up, too?

This commit amends the "Cleaning up temporary SynthDefs..." post message to display the number of SynthDefs being cleaned up. It also has a very minor refactor so that "pathMatch" is called only once, and "match.do" is not called if the match is empty.
@mossheim
Copy link
Contributor

lgtm

@telephon telephon merged commit fddb90d into supercollider:master Jan 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: class library SC class library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants