Re: Simplify redisplay-x/separate_textual_runs
17 years, 9 months
Aidan Kehoe
Ar an dara lá de mí Aibréan, scríobh Stephen J. Turnbull:
> Aidan Kehoe writes:
>
> > Where you’ve rewritten comments, your rewrites are more opaque to me
> > than what was there before. But then I wrote what was there before
> > (still long enough ago to need to understand it though), so maybe
> > that’s not surprising.
>
> I did rewrite the comment about using int, not UExtbyte, for byte1 and
> byte2. Someone who knows Mule well would guess UExtbyte, I agree, but
> my purpose for the comment is to explain why those *must* be ints,
> even though C would normally coerce other, more intuitive, integral
> types to whatever is needed. This minimal approach is purely a matter
> of style; if you still dislike it I'll correct the misspelling of
> UExtbyte and otherwise leave it alone.
I don’t have strong feelings about it, or about the rest of your changes to
the comments, and I have no objection to them going in--it absolutely may be
that more people find your formulation the more readable. I haven’t done any
surveys.
I suppose I wanted to say that reworking code and comments into what you
perceive as something more readable doesn’t necessarily help the next person
working on them. It might, it might not. Bug fixes and functionality are
normally more important.
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: Simplify redisplay-x/separate_textual_runs
17 years, 9 months
Aidan Kehoe
Ar an chéad lá de mí Aibréan, scríobh Stephen J. Turnbull:
> That said, there are two issues that I'd like insight into (no effect
> on your patch, as they apply to the original version too). (They're
> flagged with #### in the patch below.)
>
> 1. I wonder if there might be efficiency implications to the
> alignment of text_storage, since in many cases we'll be storing
> shorts or integers into it.
> 2. I wonder what happens if `ccl_setup_program' fails? Aidan, you're
> the expert on CCL, any ideas?
If setup_ccl_program fails, we don’t call the CCL program, and garbage gets
displayed (more exactly, our internal coding mapped to the positions in the
font). We’ll only crash if displaying that garbage is something the X server
can’t manage, but most of them do, especially since that XFree86 bug fix
involving zero-width tab characters was integrated.
> Also, I'd like to suggest the patch below (to be applied *on top of*
> your patch). It does the following:
>
> 1. Updates the big header comments.
> 2. Add modest header comments to the Xft/no-Mule and no-Xft/Mule
> versions.
> 3. Cleans up a couple of inline comments.
> 4. Removes some trailing whitespace.
>
> More controversially,
>
> 5. Always initialize prev_charset to Qunbound, and nuke the comment
> (I think it's unnecessary and potentially could be misleading if
> (for example) Qnil came to represent the internal charset
> (Unicode).
ichar_charset returns Vcharset_ascii, defined to Qnil on non-Mule. The
comment was wrong, though still vaguely helpful; it’s better gone.
> 6. Reorganize separate_textual_runs_mule and add comments to explain
> what's going on.
Where you’ve rewritten comments, your rewrites are more opaque to me than
what was there before. But then I wrote what was there before (still long
enough ago to need to understand it though), so maybe that’s not surprising.
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: Simplify redisplay-x/separate_textual_runs
17 years, 9 months
Aidan Kehoe
Ar an chéad lá de mí Aibréan, scríobh Olivier Galibert:
> On Fri, Mar 30, 2007 at 11:48:58PM +0200, Aidan Kehoe wrote:
> > Thanks! Please profile the two (with etc/HELLO at least working for the
> > CJK languages) and post comparisons, separate_textual_runs is called
> > quite a lot.
>
> Hmm, how is one supposed to do a reasonably reproducible profile of
> that code exactly? It's too linked to the UI for me to know how to go
> about it.
(profile-expression '(loop for i from 0 to 10000 do (sit-for 0.0)))
would be one option.
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches