Re: [E-devel] stringshare use in elementary

2011-09-30 Thread The Rasterman
On Sat, 10 Sep 2011 12:52:04 -0300 Gustavo Sverzut Barbieri
barbi...@profusion.mobi said:

 On Sat, Sep 10, 2011 at 12:44 PM, Mike Blumenkrantz m...@zentific.comwrote:
 
  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);

they are used internally - its just at the interface layer it requires a dupped
string. i opted for strdup as it's more common and i invariably expect the code
handing back strings to come from non-efl sources more often, so strdup works
best i didnt expect them to be long strings nor be en-masse duplicates.


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
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-11 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


Re: [E-devel] stringshare use in elementary

2011-09-11 Thread Mike Blumenkrantz
On Sun, 11 Sep 2011 09:51:15 +0300
Tom Hacohen tom.haco...@partner.samsung.com wrote:

 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?
It's hard to misremember a function name like
elm_gengrid_item_tooltip_size_restrict_disabled_get
 
 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).
obviously, but when it's the case that your list is composed entirely of
strings that you will be reusing, it makes a lot more sense to stringshare.
 
 --
 Tom.


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

--
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


Re: [E-devel] stringshare use in elementary

2011-09-11 Thread Tom Hacohen
On 11/09/11 10:54, Mike Blumenkrantz wrote:
 obviously, but when it's the case that your list is composed entirely of
 strings that you will be reusing, it makes a lot more sense to stringshare.

Only if you assure the strings passed are stringshares, i.e if you do 
eina_stringshare_*REF* on all the strings passed, and not 
stringshare_add, it makes sense. Otherwise, it's just slower.

--
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


[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 m...@zentific.comwrote:

 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 barbi...@profusion.mobi wrote:

 On Sat, Sep 10, 2011 at 12:44 PM, Mike Blumenkrantz m...@zentific.comwrote:
 
  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 t...@stosb.com 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