darktable-org / darktable-org/lua-scripts

Speed up Lua scripts startup

Open
#673 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
219
Forks
142
PR merge metrics
No merged PRs in 30d

Description

When images are imported from the command line at darktable startup Lua doesn't initialize quick enough to capture import events so on a multi image import the first 5 - 10 images may not be recognized.

The culprit is script_manager and the fact that it doesn't (re)start running scripts until the GUI initializes.

A possible work around that has been tested is adding a post-import-image event "buffer" into data/luarc to capture an import from the command line and make the image list available to scripts starting up and then clear the"buffer" after script_manager is fully initialized.

The best fix is to rework the way that script_manager starts scripts.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce a multi-image command-line import during darktable startup and inspect script_manager alongside data/luarc. Determine how startup script initialization and post-import-image events interact; done means the first imported images are available to scripts without relying on a GUI initialization workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
cli
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.