context-menu-launcher icon indicating copy to clipboard operation
context-menu-launcher copied to clipboard

I love it. But it's very slow.

Open futuremotiondev opened this issue 4 years ago • 7 comments

Is there a way to make the invoked command execute faster? I have a custom context menu item that simply adds selected files to a new folder. But it takes about half a second for it to complete. Terracopy has an extension that does the same thing but it's nearly instant.

Sorry for being critical, you've done some amazing work.

futuremotiondev avatar Oct 21 '21 00:10 futuremotiondev

Hi, I implemented a more versatile version of this.

https://github.com/ge9/ExecuteCommand-Pipe

It can pass input files to any program through standard input (in UTF-8), so can be used to run any command (in combination with xargs, etc.).
It's implemented using COM (Component Object Model) method, so no interprocess communication (thus much less time lag), and no limitation on path length or number of files.

ge9 avatar Jan 17 '23 23:01 ge9

it has --si-timeout {time to wait in msecs}. That's why it needs half a second. Change the value you need.

jackusay avatar May 19 '23 00:05 jackusay

Hi, I implemented a more versatile version of this.

https://github.com/ge9/ExecuteCommand-Pipe

It can pass input files to any program through standard input (in UTF-8), so can be used to run any command (in combination with xargs, etc.). It's implemented using COM (Component Object Model) method, so no interprocess communication (thus much less time lag), and no limitation on path length or number of files.

It seems to send arguments with line breaks?

mdnava avatar Jan 26 '24 12:01 mdnava

Yes, each path is suffixed by "\n" (LF) and then concatenated.

ge9 avatar Jan 26 '24 13:01 ge9

Yes, each path is suffixed by "\n" (LF) and then concatenated.

Wouldn't be much more useful to send them as proper args?, like: prog.exe arg1 arg2 arg3 As it works with singleinstance.exe ?..

mdnava avatar Jan 26 '24 14:01 mdnava

I chose this design because Windows has 32767 character command line length limit. Users may run a command on many files at a deep directory. Converting stdin to commandline args is easily done by xargs. But your design also sounds good. I'll work on this. Thank you for the feature request.

ge9 avatar Jan 26 '24 15:01 ge9

I chose this design because Windows has 32767 character command line length limit. Users may run a command on many files at a deep directory. Converting stdin to commandline args is easily done by xargs. But your design also sounds good. I'll work on this. Thank you for the feature request.

I did not make singleinstance.exe .. But I have been using it for at least 5 years in Windows context menus.. It has been working perfectly, but I've been looking for an option only because there is not proper order of sent files, when the desired outcome would be for the currently selected file to be the first argument.

In your utility, perhaps giving an additional option to send arguments in line would be helpful.

mdnava avatar Jan 26 '24 17:01 mdnava