https://gyazo.com/4d39da7f87fdd9c23a7389f0255e0395\
What exactly does this proc deal with and how do I reduce its cpu usage.
ID:2126979
Aug 4 2016, 11:55 pm
|
|
In response to Kaiochao
|
|
This is great thanks for the help
|
Minor correction: atom.color = list(1,0,0, 0,1,0, 0,0,1, r,g,b) won't work as-is; you need to divide the r,g,b values by 255.
Another way to go is atom.color = list(null,null,null,rgb(...)) which uses the short form. In short form, each value is a row and nulls mean "default for this row". |
In response to Kaiochao
|
|
I removed all instances of Blend, Crop, Shift etc and I'm still getting the same results. Where do you think this proc is being called?
|
In response to Mav472
|
|
If you're using /icon objects and displaying them to clients, e.g. by setting an atom's icon to one, or manually calling fcopy_rsc() (which setting an atom's icon does automatically), then RscFile is called. You don't need to be using any icon procs besides creating one.
|
You can't really "reduce its CPU usage" aside from not having it called in the first place.
Fortunately, with atom.color, atom.transform, atom.blend_mode, and maybe atom.appearance_flags, you can usually avoid having to use /icon objects at all.
For example, adding color to an icon (such as a piece of black clothing:
Or multiplying a piece of white clothing by a given color:
How are you using /icon objects? You might not actually need them.