• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum
    • Categories
    • Recent
    • Popular
    • Tags
    • Register
    • Login

    Calculator actor vs JavaScript

    How To... ?
    3
    4
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dritter
      last edited by

      I am working on a patch with 300 incoming floating point streams via OSC, and I need to perform continuous math functions on these streams (=7500 calculations per second for 25 fps). It would be more convenient to do this through JavaScript actors than Calculator actors. Do math functions in JavaScript run faster or slower than in  Calculator, or is there no difference?

      thank you,
      Don

      Izzy 2.6.1 USB | MBP (mid 2015) 2.8 GHz i7, 16GB, AMD Radeon R9 | OSX 10.11.6
      Corsair One, 3.7 GHz i7, 32GB, GTX1080 | Windows 10

      DusXD 1 Reply Last reply Reply Quote 0
      • jhoepffnerJ
        jhoepffner
        last edited by

        In my humble opinion, the best is to make prototype and compare the result. Unfortunately, javascript is not very fast for calculation, plus the time of translating from Isadora to JS and vice-versa. Visual programming as in Isadora is also not so efficient. OSC is also not a very efficient way of sending a huge stream of data.

        The best solution would be to transform your numeric data in image (or stay with image if you analyse it) and use glsl shader to make calculation and produce images it, or use a software more able to do calculation, as Processing, TouchDesigner or OpenFrameWork and send the result as image via Syphon or Spout to Isadora.

        It's difficult to discuss it without knowing from what come your streams, which calculation you want to do and which result you want to obtain…

        Be more specific!

        Jacques

        Jacques Hoepffner http://hoepffner.info
        GigaByte 550b / Ryzen 7 3800X / Ram 64 Go / RTX 3090 24 Go / SSD 2 To / raid0 32 To
        MBP 13' i5 2.6 Ghz 16 Go / Intel Iris / macOs 10.11.6 / izzy 2.6.1 + 3.0.3b2
        MBP 15' i7 2.6 Ghz 16 Go / GTX 650M 1Go/ MacOs10.13.3 / Izzy 2.6.1
        MSI GS65 i7 3.6 Ghz 32 Go / GTX 1070 8 Go / Windows 10 / Izzy 3.0.3b2

        1 Reply Last reply Reply Quote 0
        • DusXD
          DusX Tech Staff @dritter
          last edited by

          @dritter

          When we first introduced the JS actor I wrote a JS script to match the built in 'smoother' actor.

          I was able to run hundreds of this actor before any slowdown was apparent.

          I believe the JS actor runs in a thread so that it doesn't slow the main Isadora process. 

          My feeling is that you should be able to do this.

          I would be interested in knowing if there is  a slight difference between all being processed in 1 JS actor versus splitting the load across multiple actors.

          As mentioned above, JS isn't as fast as Isadoras native actors (written in c++).

          So you always have the option of building this up as a user actor.

          Troikatronix Technical Support

          • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
          • Isadora Add-ons: https://troikatronix.com/add-ons/
          • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

          Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

          1 Reply Last reply Reply Quote 1
          • D
            dritter
            last edited by

            Jacques and Dusx, thank you for your comments. The data is coming in real-time from a Kinect, so I believe there is no option other than OSC. I did a test and I do not notice any speed difference between the two approaches, so I have used JavaScript.

            Don

            Izzy 2.6.1 USB | MBP (mid 2015) 2.8 GHz i7, 16GB, AMD Radeon R9 | OSX 10.11.6
            Corsair One, 3.7 GHz i7, 32GB, GTX1080 | Windows 10

            1 Reply Last reply Reply Quote 1
            • First post
              Last post