Improving load Times

Improving load Times

80 Comments

Sometimes projects in Flowstone can be slow to load. Back in the days of Synthmaker this was quite a problem, nowadays load times are much better but sometimes depending on the schematic it can still be slow. This article will cover the main areas you need to be optimizing. I will provide some test schematics so you can see the differences for yourself (get your stop watch ready!). These test schematics will sometimes be “over the top” (not a real world example )  they are meant as “stress tests” the aim is to push things to the limit so we can see what really improves load times.

There has been plenty of hear say over the years about what can cause slow load times, sometimes without any real proof. This article will stop you from doing things that have no effect and get you straight onto the things that do, so lets get on with it!

Don’t make your modules hierarchy too deep

Modules are incredibly useful for organizing our schematics, but if you are creating too many deeply nested modules this can have a negative effect on load times. Here is an example Deep Levels, inside you will find many modules with very deep module hierarchies, at the bottom of each is a single float component.

Now compare this one One Level, that too contains a single float component but it is only one level deep. Hopefully you can noticed the difference. The deep levels schematic takes 2 seconds to load on my PC while the other is instant. Consider this, the schematic is doing NOTHING and is only 6KB in size and it is taking 2 seconds!

Please don’t stop using modules though! Just be aware that many deeply nested modules can have a negative effect on load time.  If you only have a small handful of deeply nested modules then do not expect to see a noticeable improvement, so it is probably not worth the effort in small cases.

Avoid the use of index selectors, with large lists

Index selectors are no longer used in any of the Ruby based components that come with Flowstone. Index selectors are used to display a list of options in a drop down menu on the properties panel. It was used in all the old primitive based components. If you are using the old primitive based components I would not go deleting all the index selectors. The only case where I would delete them is in cases of very large lists of options because this is where the real slow down comes.

It was once assumed that the System fonts primitive would cause slow load times, I can show that is not the case. See this schematic System font primitives, this contains 144 System font primitives and loads in under half a second on my PC and I have 1232 fonts on my system.

Now try this one that has an index selector connected to each one, System font with index selector. That loads in about 2.2 seconds on my PC. So it is clear to see that the extra loading time really comes from the index selector. The more fonts on the system the slower the one with index selectors will load.

Back when Flowstone was called Synthmaker load times was a real issue, this was one of the main causes, some people where reporting load times of upwards of 30 seconds. I’m betting they had a lot of fonts on their system (thousands) and the index selector was slowing it right down.

Prefer Ruby based components over primitive ones

Ruby based components should usually load much faster than primitive based ones. Compare the load time of this schematic containing 500 primitive based knobs 500 Primitive knobs, with this one based in Ruby 500 Ruby knobs.

There are actually many reasons why the Ruby knobs are faster. One of the reasons is module depth. Primitive based components tend to have a much deeper hierarchy than their Ruby counterparts.  Another is Rubys interpreter, which is very fast.  Ruby also doesn’t use triggers like primitives do, many components fire triggers on load which can cause everything to recalculate, often unnecessarily. Ruby components also do not use index selectors, so all of this adds up to the Ruby based components loading much faster.

One problem with using Ruby based components (well the knobs at least) is they are not quite as feature rich as the old primitive ones, so if you need certain features such as ‘snap’ then you may have to stick with the old versions.

Beware of after load triggers

There is a component called “After Load” which gives us a trigger which can be useful in some situations. Beware of triggering anything that involves heavy processing, your project will not load until this processing has completed. It is also important to know that some other components output their own “After Load” trigger.

These include…

  • Preset Parameter Array
  • Sample Rate
  • Wavetable Create

There could be more, but these are the ones I am aware of.

This is important to know because you could be doing extra processing during load and not even know it.

Take this example from the wave draw oscillator that comes with Flowstone….

wavetable twiceCrop

Can you spot the problem? The wavetable is created twice on load! Why? because the wavetable is created automatically on load (first create) and then a trigger is sent again to the create input forcing it to be recreated again. This is because of the Preset Parameter Array which outputs its own trigger on load.

Here is the correct way to do it… Wavetable correct . Here I avoid getting a trigger from the array and get it directly from the drag component.

So be aware that these components could be causing extra processing and adding to load times.

Avoid very large wavetables

The larger the wavetable the longer the load time of your synth or effect. It is a trade off, very large wavetables will make a very rich, nice sounding oscillator but will add significantly to load times. I find that a table size of 1024 is about right. But if you are prepared to go lower this will save a noticeable amount of load time.

 Don’t store large amounts of  data in Text components, prefer arrays where possible.

It is common to see waveforms stored inside text components for use with the wavetable create. This can add noticeably to load times if the waveform is large and there are many (ie hundreds). The reason being is that all the data in the text component has to be converted to a float array, this is noticeably slow for large arrays and should be avoided. Instead store the data as an array avoiding the conversion.

Here is a schematic which contains 1200 text components being passed to an array, Text to array . Each text file contains 4096 zeros, this is just to simulate a large waveform (the zeroes don’t matter).

Now here is the same schematic but without using text components, Just array. This one should be faster because now there is no conversion to float array happening on load. You may not be passing a text component directly to an array component like this, but even if you just pass it to an array output connector, the conversion is still happening.

Limit the number of controls in your project

This should be obvious from the 500 knobs test done earlier. Limit the amount of controls in your project. Ask yourself do I really need to expose this functionality? Or maybe you have a Synth that has 5 oscillators, each oscillator section might have 10 controls (fine,semi,octave,waveform,phase ect…) do you really need 5 oscillators? Maybe 3 would be OK and hence with that you could just have reduced by 20 controls.

Limit the amount of data such as images and wave files stored inside your project

This one is not practical for me to do stress tests because of the resulting file sizes, but keep your schematic size to a minimum. Only package what is absolutely necessary in your schematic. You may want to include a few wave files in the schematic, this is fine, but if you are shipping a large sound bank with the VST then make that separate and don’t include it in the schematic.

Also consider creating a background image which contains as much of the GUI elements built into it as possible such as Labels beneath controls or the controls themselves (this works for static knobs). This can save many different images being loaded. One image will load faster than many different ones, and will reduce file size.

Wireless Links

I have done some tests of wireless links and these tests show that wireless links can actually improve load times. I changed the Deep levels schematic to use wireless links instead of normal links and load time halved and is now nearly instant! Check it out Deep Levels wireless. For easy reference here is the original Deep levels from earlier in the article Deep Levels.

This is not conclusive but it does show that wireless links can actually help with load times, at least in this case. There could be cases where it proves slower, I will have to think up some more types of test for it to be conclusive. But I suspect that previous assumptions that wireless links add to load times are not correct, at least not always.

My reasoning for the wireless version of  Deep Levels to load faster is the lack of input components in the schematic. In the original example there was literally thousands of input components (320 per level). So with the use of wireless we are actually removing the need for many components. This reduction is obviously giving a more positive contribution than any potential negative effect of using wireless.

This means the real cost of wireless is hard to judge but the benefits (less components) would seem to override any potential costs.

 

That it for now…

Hopefully this article has been of some use and now you know a few things about how to keep load times respectable.

If I have overlooked anything or you know of some other areas that can be improved let me know in the comments and I will update the article!

 

 

 

0 0 0 0 0
Exo

About the author:

I am the founder of Flowstone Guru. I have been using Flowstone since the early days when it was Synthmaker, talking 7-8 years now! I have created lots of things in Flowstone and have a wealth of experience with the software, some of my work you will find on this site in the Downloads section. I'm passionate about programming (Flowstone, Java ,C++,Ruby) there is nothing I like to do more. I just love a challenge and enjoy pushing myself and the tools I use to there limits!

80 Comments

  1. Nubeat 7  - January 27, 2015 - 11:21 am

    what about wireless links? on the old SM forum it was suggested to don’t use em to much because of faster loading time,

    i really use a lots of wireless links to have clear schematics with different sections like GUI, Modulators and Streamprocessing which i connect normally with wireless links

    i couldn’t think of a reason why it should be slower because i assume that FS will compile them the same way as normal links?

  2. Exo
    Exo  - January 27, 2015 - 12:03 pm

    Ah yes wireless, I will create some tests and update the article. I suspect they might add a bit.
    I think Flowstone does treat them differently. It has to “find” the links automatically, whether or not these found links are saved I don’t know. It is possible that it has to re-find them all. But technically it shouldn’t need too.

  3. Nubeat 7  - February 2, 2015 - 9:20 pm

    thank you Exo for testing wireless links too, this is very interesting, and now logical too.

  4. Google  - August 19, 2018 - 6:24 pm

    Google

    Very couple of websites that come about to become in depth below, from our point of view are undoubtedly very well really worth checking out.

  5. lesbico  - August 23, 2018 - 8:17 pm

    lesbico

    […]Every as soon as inside a whilst we pick out blogs that we study. Listed below would be the most current web-sites that we pick […]

  6. xmobile pro  - August 25, 2018 - 10:26 am

    xmobile pro

    […]here are some links to web sites that we link to because we consider they may be really worth visiting[…]

  7. pc app free download  - August 25, 2018 - 10:57 pm

    pc app free download

    […]we like to honor many other online web pages around the net, even though they aren’t linked to us, by linking to them. Beneath are some webpages really worth checking out[…]

  8. app for pc download  - August 26, 2018 - 11:52 am

    app for pc download

    […]always a large fan of linking to bloggers that I really like but really don’t get lots of link like from[…]

  9. free porn xxx  - August 27, 2018 - 10:57 pm

    free porn xxx

    […]although web sites we backlink to beneath are considerably not associated to ours, we really feel they’re in fact really worth a go via, so possess a look[…]

  10. Bvlgari  - August 28, 2018 - 9:01 am

    Bvlgari

    […]we prefer to honor quite a few other net web sites on the internet, even if they aren’t linked to us, by linking to them. Underneath are some webpages worth checking out[…]

  11. Chloe  - August 28, 2018 - 5:05 pm

    Chloe

    […]Here is an excellent Weblog You might Discover Interesting that we Encourage You[…]

  12. mcat cars aamc  - August 30, 2018 - 1:27 pm

    mcat cars aamc

    […]we came across a cool internet site which you may well enjoy. Take a look should you want[…]

  13. 123klussers.nl/klustips  - August 31, 2018 - 11:09 pm

    123klussers.nl/klustips

    […]Wonderful story, reckoned we could combine some unrelated data, nevertheless actually worth taking a look, whoa did one find out about Mid East has got additional problerms also […]

  14. silicone dildo  - September 2, 2018 - 9:15 am

    silicone dildo

    […]The information and facts mentioned in the article are a number of the best obtainable […]

  15. how to use sex vibrator  - September 2, 2018 - 9:37 am

    how to use sex vibrator

    […]usually posts some pretty intriguing stuff like this. If you’re new to this site[…]

  16. interracial porn xxx  - September 4, 2018 - 1:34 pm

    interracial porn xxx

    […]although sites we backlink to beneath are considerably not associated to ours, we really feel they’re essentially really worth a go by, so have a look[…]

  17. travellergram  - September 4, 2018 - 10:33 pm

    travellergram

    […]please take a look at the internet sites we adhere to, like this a single, because it represents our picks through the web[…]

  18. sex toy review  - September 5, 2018 - 2:17 pm

    sex toy review

    […]please go to the web sites we comply with, including this a single, because it represents our picks in the web[…]

  19. ben wa  - September 5, 2018 - 5:44 pm

    ben wa

    […]that is the end of this report. Right here you’ll uncover some web-sites that we think you will value, just click the links over[…]

  20. giovanni verga tesina  - September 6, 2018 - 10:58 am

    giovanni verga tesina

    […]very few web sites that come about to become in depth beneath, from our point of view are undoubtedly effectively really worth checking out[…]

  21. سکس ایرانی  - September 12, 2018 - 1:34 am

    سکس ایرانی

    […]we came across a cool web-site that you simply could enjoy. Take a appear in case you want[…]

  22. FS19 mods  - September 12, 2018 - 9:16 pm

    FS19 mods

    […]very few web sites that come about to become detailed below, from our point of view are undoubtedly properly really worth checking out[…]

  23. erotic sex stories  - September 13, 2018 - 3:23 pm

    erotic sex stories

    […]Here is a great Weblog You might Come across Exciting that we Encourage You[…]

  24. Stepfamily Porn Online  - September 14, 2018 - 2:29 pm

    Stepfamily Porn Online

    […]here are some links to web pages that we link to since we assume they are worth visiting[…]

  25. Stepfamily Porn Online  - September 14, 2018 - 10:05 pm

    Stepfamily Porn Online

    […]we came across a cool website that you just may well appreciate. Take a search in the event you want[…]

  26. houses for sale in bellflower ca  - September 16, 2018 - 8:14 am

    houses for sale in bellflower ca

    […]please take a look at the sites we follow, which includes this one particular, as it represents our picks in the web[…]

  27. سكس مترجم  - September 17, 2018 - 12:03 am

    سكس مترجم

    […]Here is a great Weblog You may Locate Fascinating that we Encourage You[…]

  28. Dolce and Gabbana  - September 17, 2018 - 12:39 am

    Dolce and Gabbana

    […]here are some links to web pages that we link to since we believe they’re really worth visiting[…]

  29. Jimmy Choo  - September 17, 2018 - 7:18 am

    Jimmy Choo

    […]one of our visitors just lately proposed the following website[…]

  30. 5 bedroom houses for sale in nigeria  - September 21, 2018 - 9:22 pm

    5 bedroom houses for sale in nigeria

    […]just beneath, are quite a few absolutely not associated sites to ours, nevertheless, they may be certainly worth going over[…]

  31. lego kopen  - September 22, 2018 - 10:04 pm

    lego kopen

    […]Here are some of the web-sites we advise for our visitors[…]

  32. Parfum Vergelijk  - September 24, 2018 - 6:01 pm

    Parfum Vergelijk

    […]Here are some of the internet sites we recommend for our visitors[…]

  33. W88Thai  - September 26, 2018 - 2:27 am

    W88Thai

    […]check beneath, are some entirely unrelated web-sites to ours, nevertheless, they may be most trustworthy sources that we use[…]

  34. erotic  - September 26, 2018 - 3:27 pm

    erotic

    […]the time to study or stop by the content material or web pages we have linked to beneath the[…]

  35. season of love testo  - September 26, 2018 - 8:00 pm

    season of love testo

    […]below you will discover the link to some sites that we feel you need to visit[…]

  36. youtube downloader online  - September 27, 2018 - 1:04 pm

    youtube downloader online

    […]Wonderful story, reckoned we could combine a number of unrelated information, nevertheless definitely worth taking a appear, whoa did one understand about Mid East has got a lot more problerms too […]

  37. ww88  - September 28, 2018 - 12:13 am

    ww88

    […]below you’ll locate the link to some internet sites that we think you must visit[…]

  38. داستان سکسی  - September 28, 2018 - 1:23 am

    داستان سکسی

    […]below you’ll uncover the link to some sites that we believe it is best to visit[…]

  39. best sex toys  - September 30, 2018 - 1:21 pm

    best sex toys

    […]the time to study or take a look at the content or sites we’ve linked to below the[…]

  40. male sex toys  - October 2, 2018 - 12:34 pm

    male sex toys

    […]we prefer to honor quite a few other world-wide-web web-sites on the internet, even though they aren’t linked to us, by linking to them. Beneath are some webpages worth checking out[…]

  41. male masturbators  - October 2, 2018 - 4:33 pm

    male masturbators

    […]Every once in a although we select blogs that we study. Listed beneath would be the newest web sites that we pick out […]

  42. SMT reflow oven  - October 7, 2018 - 3:21 pm

    SMT reflow oven

    […]we came across a cool site that you simply may well appreciate. Take a appear when you want[…]

  43. ht h7730wm za  - October 7, 2018 - 8:06 pm

    ht h7730wm za

    […]Every once in a though we decide on blogs that we study. Listed below are the most up-to-date sites that we decide on […]

  44. Free uk delivery print services  - October 10, 2018 - 12:48 am

    Free uk delivery print services

    […]Wonderful story, reckoned we could combine a few unrelated information, nevertheless truly really worth taking a appear, whoa did one particular discover about Mid East has got far more problerms at the same time […]

  45. Crazy Games free download for pc  - October 10, 2018 - 1:10 pm

    Crazy Games free download for pc

    […]please go to the web-sites we stick to, like this one particular, because it represents our picks from the web[…]

  46. USB flash drive factory  - October 12, 2018 - 8:35 am

    USB flash drive factory

    […]please pay a visit to the web sites we comply with, such as this one particular, as it represents our picks through the web[…]

  47. smt reflow oven  - October 13, 2018 - 1:56 am

    smt reflow oven

    […]The data talked about inside the write-up are a number of the very best accessible […]

  48. flyer delivery  - October 14, 2018 - 10:17 pm

    flyer delivery

    […]always a massive fan of linking to bloggers that I really like but don’t get lots of link appreciate from[…]

  49. Dave's Original Mild Chili Recipe  - October 16, 2018 - 9:01 pm

    Dave’s Original Mild Chili Recipe

    […]although internet sites we backlink to below are considerably not associated to ours, we really feel they are basically really worth a go via, so possess a look[…]

  50. best online dumps shop  - October 18, 2018 - 1:32 pm

    best online dumps shop

    […]although web sites we backlink to below are considerably not related to ours, we feel they are actually worth a go by means of, so have a look[…]

  51. domain names  - October 19, 2018 - 9:16 am

    domain names

    […]always a major fan of linking to bloggers that I really like but don’t get a great deal of link love from[…]

  52. Junk Removal DC  - October 20, 2018 - 1:36 pm

    Junk Removal DC

    […]that may be the end of this report. Right here you’ll discover some sites that we believe you’ll appreciate, just click the links over[…]

  53. sex toy kits for her  - October 20, 2018 - 11:15 pm

    sex toy kits for her

    […]Here is a great Weblog You may Come across Exciting that we Encourage You[…]

  54. dewa poker  - October 21, 2018 - 9:07 pm

    dewa poker

    […]although internet sites we backlink to beneath are considerably not connected to ours, we really feel they are basically worth a go through, so possess a look[…]

Add Comment Register



Leave a comment

You must be logged in to post a comment.

Back to Top