Add multithreading to MosaicByCoordinates

Rerouter

New member
Currently planning some larger mosaics, as this is reprojecting per image I would prefer to see it being done on multiple files at once to speed up the workflow, I have a 3960X, so watching it go 1 file at a time is a little annoying,
 
i think this is not possible as the javascript engine itself is single threaded. at the moment, scripts need to be rewritten as processes to take advantage of multiple cores.
 
Is there any documentation of the process of that conversion, I'm weak in javascript but seems like processes are more baked into pix?
 
As pfile has said, it is not possible. The warping process is written in JS so it can not be parallelized. The current JS engine is quite old and it doesn't support WebWorkers (nor clasess, lambda functions, ...).
In order to get a multithread implementation it would be necessary to implement it in C++ as a process.
 
A new astrometry-based mosaic construction tool is already under development and will be available during the 1.8.9 version cycle. Of course it will be fully parallelized and will include frame adaptation features to generate seamless mosaics, only limited by the amount of memory available.

As for the current JavaScript engine, yes, it is indeed quite old (2014). An update to one of the latest versions of the SpiderMonkey engine is also planned as a priority task, but this requires a *lot* of work (basically, a complete rewrite of more than 300,000 lines of extremely delicate source code). So bear with us! :)
 
i think this is not possible as the javascript engine itself is single threaded. at the moment, scripts need to be rewritten as processes to take advantage of multiple cores.

Is it also a limitation of the current JS engine / implementation that only one script instance can be run at a time? In other situations like this I like to parallelize single-thread-limited processes by just running multiple instances on different data. I would of course like to do that in PixInsight, but I suspect it is much easier said than implemented.

(relatedly, I've had AlignByCoordinates running for the last 12 hours on my latest dataset!)
 
Last edited:
that is a good question, i don't know if multiple contexts can be established in PJSR. i sort of suspect not, but it is hard to know since generally scripts block the UI, preventing you from even trying.

one thing you can do is run an entirely new instance of pixinsight itself:

/Applications/PixInsight/PixInsight.app/Contents/MacOS/PixInsight -n

you can also say --help to see all the command line arguments available. there are a lot of IPC type things and some newer background modes which i think are an offshoot of AstroBin using PI to do all the solving/annotation.

rob
 
that is a good question, i don't know if multiple contexts can be established in PJSR. i sort of suspect not, but it is hard to know since generally scripts block the UI, preventing you from even trying.

one thing you can do is run an entirely new instance of pixinsight itself:

/Applications/PixInsight/PixInsight.app/Contents/MacOS/PixInsight -n

you can also say --help to see all the command line arguments available. there are a lot of IPC type things and some newer background modes which i think are an offshoot of AstroBin using PI to do all the solving/annotation.

rob

That's very useful information! I guess I didn't know there were command line options, so I'll look into those and try multiple instances as well. Thanks!
 
Was the astrometric mosaic process released in 1.8.9? I'm on 1.8.9-1 and I don't see a process with the right name. If it's not out yet, I'll second a request for accelerated development. Thanks!
 
Back
Top