[Qgis-developer] Disable Syntax Highlighting in DB Manager

Giuseppe Sucameli brush.tyler at gmail.com
Sun Nov 24 15:59:51 PST 2013


Hi Lee,

On Sun, Nov 24, 2013 at 10:24 PM, Lee Hachadoorian <
Lee.Hachadoorian+L at gmail.com> wrote:

> I find the DB Manager SQL window to be unusable, and have confirmed that
> it is because of syntax highlighting [...].
>
 [...]

> This is correct in that QGIS does not completely stop responding, but the
> latency is so high as to make the dialog unusable for anything other than
> pasting in an already tested query.


 A very long query (>100.000 chars) takes a long time (>10 secs) to be
parsed... linearly.


> Try, for example, typing `SELECT 1;` into the window, and see how long it
> takes you.


It highlights it quite immediately, I'm unable to see any latency.
How many time does it take to run on your system?

At the moment, I have altered my local version by commenting out lines 34
> and 56 of /usr/share/qgis/python/plugins/db_manager/dlg_sql_window.py. I
> would like to suggest that until some time can be invested in making the
> syntax highlighting functionality usable (if there is even interest in
> doing so for a feature that is just eye candy), that this change be
>
tested and incorporated in the official version.
>

The syntax highlighting is already usable as it is, nobody else is
experiencing any issue with it... Surely it can be improved, but definitely
it's not just eye candy, as it helps in writing queries.

We may add a check to skip syntax highlighting when the query is very long,
but it won't help in your case.
It's better to add a way to disable it when not needed or whether it cause
any trouble.

Regards.
Giuseppe.

>
> --Lee
>
>
> --
> Lee Hachadoorian
> Assistant Professor in Geography, Dartmouth College
> http://freecity.commons.gc.cuny.edu
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Giuseppe Sucameli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20131125/6b7756ee/attachment-0001.html>


More information about the Qgis-developer mailing list