alexandernst
alexandernst

Reputation: 15109

Fast loading for performance improvement

I have an application that does some work (requests data from a webserver, parses it, and returns the important stuff). While the entire process doesn't take more than 1s, the startup of the application is quite long (around 5s maybe).

I want to be able to run my app on the background and pass it URLs from somewhere else so I can avoid the startup time. I firstly thought about IPC but then I'll need to have another application which will have some startup time too (so that is not perfect).

Then I thought about qBus, but the application runs on Windows too (is it possible to have something like qBus on Windows?). So, that isn't a solution either.

My question is: how can I "talk" to my application (as in "take this URL, process it and give me the important data") avoiding unnecesary startup-time?

Upvotes: 0

Views: 52

Answers (1)

Bernhard Barker
Bernhard Barker

Reputation: 55609

A few options I can think of:

The start-up time of the other application should be a fraction of a second, if it's not, you're doing something wrong.

  • Standard input

Requires manually giving it to the application (probably an option for IPC, but not the best option), won't work with bash scripts.

  • External file which your program periodically checks (either for updates or existence)

Maybe not the most elegant solution, but easy to implement and you can manually open it, pipe text to it in a bash script, or use it for IPC.

Upvotes: 1

Related Questions