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

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to