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

menu file SELECT bogs lua timing #815

Closed
tehn opened this issue Apr 15, 2019 · 8 comments
Closed

menu file SELECT bogs lua timing #815

tehn opened this issue Apr 15, 2019 · 8 comments
Labels

Comments

@tehn
Copy link
Member

@tehn tehn commented Apr 15, 2019

the script list folder recursion is too heavy for lua to maintain timing of metros/etc, so it's likely that metros will get stalled and a running script will stutter. (ie awake)

more pronounced with more scripts in the folder.

coroutines is one solution.

@tehn tehn added bug lua menu labels Apr 15, 2019
@okyeron
Copy link
Contributor

@okyeron okyeron commented Apr 15, 2019

There may also be other/faster ways to get/parse the directory structure without recursively hammering scandir/popen

I looked at this briefly awhile back and will revisit

@audionerd
Copy link
Contributor

@audionerd audionerd commented Apr 25, 2019

In build_select_tree , how about a single popen to find . -type f -name "*.lua" and then filter that list?

@tehn
Copy link
Member Author

@tehn tehn commented Apr 25, 2019

that would certainly accelerate the process if you want to give it a try. i won't be able to get to this for a bit.

@audionerd
Copy link
Contributor

@audionerd audionerd commented Apr 26, 2019

i gave it a try:

audionerd@faa4b1c#diff-43ab06b2651c491ba3ef9004fa809bd1

but i still notice a lag in metros & dropped MIDI clock messages on SELECT :/

@tehn
Copy link
Member Author

@tehn tehn commented Jun 23, 2019

likely needs #779

@catfact
Copy link
Collaborator

@catfact catfact commented Aug 24, 2019

i'm trying to see how a coroutine could help this. i will make some relevant comments on 779.

the only actual solution i see is to create an asynchronous wrapper for these blocking OS calls, in C, backed by pthreads. coroutines could rovide some convenient syntax on the lua side.

@catfact
Copy link
Collaborator

@catfact catfact commented Aug 24, 2019

i'd actually recommend closing this and making #779 more specific ("implement asynchronous system calls")

@tehn
Copy link
Member Author

@tehn tehn commented Aug 24, 2019

agreed!

@tehn tehn closed this Aug 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants