Did a bit of work to EWL in an attempt to make it’s memory needs a bit smaller with a good bit of success. The old system used Ecore_Lists to store the lists of callbacks that a widget has attached. Nathan noticed that the list head was in general about the size of 3 list nodes and since it isn’t uncommon for these lists to only have 1 or 2 nodes thats a pretty big deal.
So, I sat down and ripped all the Ecore_List bits out of there and set it to use an array (with a bit of magic to not need an array for a single entry). This had a pretty good effect on the memory needs of EWL.
The results from running top with: Ewl_Test and opening all test windows With ecore_list 9121 dsinclai 15 0 71156 17m 4276 S 0.0 1.8 0:11.06 ewl_test With array 21727 dsinclai 15 0 68360 15m 4304 S 0.0 1.5 0:09.73 ewl_test The ewl_filedialog on a directory with 3000 entries With ecore_list 25626 dsinclai 16 0 147m 95m 4084 S 0.0 9.5 0:05.42 ewl_test With array 6871 dsinclai 25 0 115m 63m 4104 S 0.0 6.4 0:04.62 ewl_test
So, the first test shows a savings of about 2 megs, and the second test with a huge number of widgets shows a savings of about 32megs. Both of which I think are pretty significant.
So, I’m pleased.