[E-devel] stringshare use in elementary

2011-09-10 Thread Mike Blumenkrantz
Hi,

Why is stringshare not used for labels in genlist/gengrid? It seems stupid that
such a commonly used widget does not take advantage of stringshares...

-- 
Mike Blumenkrantz
Zentific: Coding in binary since '10.

--
Malware Security Report: Protecting Your Business, Customers, and the 
Bottom Line. Protect your business and customers by understanding the 
threat from malware and how it can impact your online business. 
http://www.accelacomm.com/jaw/sfnl/114/51427462/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] stringshare use in elementary

2011-09-10 Thread Gustavo Sverzut Barbieri
On Sat, Sep 10, 2011 at 12:44 PM, Mike Blumenkrantz wrote:

> Hi,
>
> Why is stringshare not used for labels in genlist/gengrid? It seems stupid
> that
> such a commonly used widget does not take advantage of stringshares...
>

No idea, raster did it that way... it remained that way. Makes perfect sense
to me, most of the times you'll get the label from a stringshared resource
and then stick it into stringshared resource (evas/edje).

I guess he did it like that since his test code was creating strings
dynamically with snprintf("Item %d", counter);

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202
--
Malware Security Report: Protecting Your Business, Customers, and the 
Bottom Line. Protect your business and customers by understanding the 
threat from malware and how it can impact your online business. 
http://www.accelacomm.com/jaw/sfnl/114/51427462/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] stringshare use in elementary

2011-09-10 Thread Mike Blumenkrantz
On Sat, 10 Sep 2011 12:52:04 -0300
Gustavo Sverzut Barbieri  wrote:

> On Sat, Sep 10, 2011 at 12:44 PM, Mike Blumenkrantz wrote:
> 
> > Hi,
> >
> > Why is stringshare not used for labels in genlist/gengrid? It seems stupid
> > that
> > such a commonly used widget does not take advantage of stringshares...
> >
> 
> No idea, raster did it that way... it remained that way. Makes perfect sense
> to me, most of the times you'll get the label from a stringshared resource
> and then stick it into stringshared resource (evas/edje).
> 
> I guess he did it like that since his test code was creating strings
> dynamically with snprintf("Item %d", counter);
> 
hmm at the least I'd think there would be a way to set a mode for it using
something like elm_genlist_stringshare_mode_set or something...

-- 
Mike Blumenkrantz
Zentific: Coding in binary since '10.

--
Malware Security Report: Protecting Your Business, Customers, and the 
Bottom Line. Protect your business and customers by understanding the 
threat from malware and how it can impact your online business. 
http://www.accelacomm.com/jaw/sfnl/114/51427462/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] stringshare use in elementary

2011-09-10 Thread Tom Hacohen
On 10/09/11 18:59, Mike Blumenkrantz wrote:
> hmm at the least I'd think there would be a way to set a mode for it using
> something like elm_genlist_stringshare_mode_set or something...
> 

No way, don't ruin the API. :)

I guess it doesn't really matter cause genlist only creates actual items
for the visible items of the list which don't waste much memory anyway...

--
Tom.

--
Malware Security Report: Protecting Your Business, Customers, and the 
Bottom Line. Protect your business and customers by understanding the 
threat from malware and how it can impact your online business. 
http://www.accelacomm.com/jaw/sfnl/114/51427462/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] stringshare use in elementary

2011-09-10 Thread Mike Blumenkrantz
On Sat, 10 Sep 2011 19:54:18 +0300
Tom Hacohen  wrote:

> On 10/09/11 18:59, Mike Blumenkrantz wrote:
> > hmm at the least I'd think there would be a way to set a mode for it using
> > something like elm_genlist_stringshare_mode_set or something...
> > 
> 
> No way, don't ruin the API. :)
too late! check out what I did in 61735 :D
> 
> I guess it doesn't really matter cause genlist only creates actual items
> for the visible items of the list which don't waste much memory anyway...
> 
> --
> Tom.


-- 
Mike Blumenkrantz
Zentific: Coding in binary since '10.

--
Malware Security Report: Protecting Your Business, Customers, and the 
Bottom Line. Protect your business and customers by understanding the 
threat from malware and how it can impact your online business. 
http://www.accelacomm.com/jaw/sfnl/114/51427462/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] stringshare use in elementary

2011-09-10 Thread Tom Hacohen
On 10/09/11 20:01, Mike Blumenkrantz wrote:
> too late! check out what I did in 61735 :D

61735? That's not recent, are you sure that's the one?

Btw, also, malloc is faster than stringshare, I guess that's also a 
reason why he opted for that (as I said, it's only a small number of 
strings, only the visible ones).

--
Tom.

--
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel