Hi, A little more information - in the second example whilst the UI appears to be locked the threads running appear to be quite active, doing lots of text parsing, formatting and laying out. Am I simlpy asking the textblock to do too much or is there some efficiency I am missing.
Is it possible to get the format block I create and tell it to terminate 5 characters later, for example? (i.e. to avoid more text parsing of the closing format?) Thanks again, Andrew On 12/10/14 23:05, Andrew Williams wrote: > Hi guys, > > In the EDI syntax highlighting I am hittng performance issues > unsurprisingly as I apply all colouring to the single string of the > whole file in the following manner: > > evas_textblock_cursor_line_set(_format_cursor, range.start.line - 1); > evas_textblock_cursor_pos_set(_format_cursor, > evas_textblock_cursor_pos_get(_format_cursor) + range.start.col - 1); > evas_textblock_cursor_format_prepend(_format_cursor, color); > > evas_textblock_cursor_line_set(_format_cursor, range.end.line - 1); > evas_textblock_cursor_pos_set(_format_cursor, > evas_textblock_cursor_pos_get(_format_cursor) + range.end.col - 1); > evas_textblock_cursor_format_prepend(_format_cursor, > EDI_COLOR_FOREGROUND); > > This works for small files but for large ones it takes a long time to > process and in the end does not actually apply any colouring to the text. > I assumed that the reason is that I need to clear existing formats so > I tried this: > > evas_textblock_cursor_line_set(_format_cursor, range.start.line - 1); > evas_textblock_cursor_pos_set(_format_cursor, > evas_textblock_cursor_pos_get(_format_cursor) + range.start.col - 1); > evas_textblock_cursor_format_prepend(_format_cursor, "+ color=#f00"); > > evas_textblock_cursor_line_set(_format_cursor, range.end.line - 1); > evas_textblock_cursor_pos_set(_format_cursor, > evas_textblock_cursor_pos_get(_format_cursor) + range.end.col - 2); > evas_textblock_cursor_format_append(_format_cursor, "- color=#f00"); > > (just a proof of concept clearly) > but on the files where it fook forever and/or did not work it looks up > and never completes. > > Any suggestions as to what I should be doing? > > Thanks, > Andrew ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
