[liblouis-liblouisxml] Re: Delay and CPU gobbling with translateString(), short files, and braillePages=yes

  • From: Michael Whapples <mwhapples@xxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Wed, 2 Nov 2011 01:07:52 +0000

I personally doubt its that. Firstly from logically thinking what the python 
bindings are doing (main processing is simply applying a unicode encoding to a 
byte string and its using standard python stuff for that), but also from my 
experiment with modifying the bindings to get a time reading on the C call it 
makes.

Michael whapples
On 1 Nov 2011, at 20:52, John J. Boyer wrote:

> If braille page numbers are being placed at the bottom of the page and 
> the file is very short a lot of blank lines with just the crlf will be 
> produced. Maybe the Python bindings don't handle this well.
> 
> John
> 
> On Tue, Nov 01, 2011 at 01:01:14PM +0000, Michael Whapples wrote:
>> I have just thought, its probably not to do with the python bindings as you 
>> say changing one of the config settings removes the issue (IE. it is caused 
>> by one of the config settings). The python bindings are totally ignorant of 
>> the configuration used, except for the value you pass in to the call which 
>> as memory goes the bindings just pass on (IE. the bindings do not use the 
>> configuration settings).
>> 
>> Does this bug show with C applications using liblouisxml? Have you tried 
>> with the programs included with liblouisxml? If a programme using the C API 
>> still shows the bug then I can leave it as far as the python bindings go 
>> (except for may be writing python bindings for liblouisutdml).
>> 
>> Michael Whapples
>> On 1 Nov 2011, at 08:49, Joanmarie Diggs wrote:
>> 
>>> Hi John.
>>> 
>>> Thank you for your reply. Just how deprecated is deprecated? <smiles> In
>>> other words, if someone provides a fix for this bug will that fix find
>>> its way into a new release of liblouisxml as part of the stable
>>> maintenance state this module is now in?
>>> 
>>> Related to your suggestion about new bindings for liblouisutdml, any
>>> plans for doing so through gobject-introspection?
>>> 
>>> Take care.
>>> --joanie
>>> 
>>> On Sun, 2011-10-30 at 18:26 -0500, John J. Boyer wrote:
>>>> I think this is a problem with the Python bindings. I'm not a Python 
>>>> progrrammer, but they looked dubious to me. Please give the people who 
>>>> use Python a chance to respond. It would probably be best to create 
>>>> wholly new bindings for liblouisutdml. liblouisxml is deprecated. 
>>>> Developmennt is now on liblouisutdml. There are already Java bindings.
>>>> 
>>>> John
>>>> 
>>>> On Sun, Oct 30, 2011 at 06:20:32PM -0400, Joanmarie Diggs wrote:
>>>>> Hi again.
>>>>> 
>>>>> With respect to this issue I reported below, I created a simple test
>>>>> script which demonstrates the problem. It can be found in a new issue
>>>>> I filed for this problem:
>>>>> http://code.google.com/p/liblouisxml/issues/detail?id=5
>>>>> 
>>>>> Thanks again. Take care.
>>>>> --joanie
>>>>> 
>>>>> On Sun, Oct 30, 2011 at 12:11, Joanmarie Diggs
>>>>> <joanmarie.diggs@xxxxxxxxx> wrote:
>>>>>> Hi all.
>>>>>> 
>>>>>> If I use translateString() from liblouisxml's python bindings to
>>>>>> translate the contents of a very short file, and I also have
>>>>>> braillePages set to 'yes', the amount of time it takes for that file
>>>>>> to be translated is quite large. And CPU shoots up to nearly 100% for
>>>>>> the duration of the translation. Setting braillePages to 'no' makes
>>>>>> the issue go away, and I've not seen this issue occur with files with
>>>>>> a more "normal" amount of text.
>>>>>> 
>>>>>> As for what is the definition of "very short file" and "long time", a
>>>>>> quick bit of data:
>>>>>> 
>>>>>> character count of original: 93
>>>>>> translation time: 0.003 seconds
>>>>>> 
>>>>>> character count of original: 75
>>>>>> translation time: 98.253 seconds
>>>>>> 
>>>>>> The second test case was a copy of the first test case with some words
>>>>>> removed. Both test cases were simple documents written in Gedit. And
>>>>>> both test cases were translated using the same configuration.
>>>>>> 
>>>>>> While not technically an endless loop (after all, the process
>>>>>> eventually does return), this issue sounds similar to "Fixed endless
>>>>>> loop when braillePages=yes" listed in the release notes for 2.4.0. So
>>>>>> at least in theory have that fix.
>>>>>> 
>>>>>> Any ideas as to what's going on?
>>>>>> 
>>>>>> Lastly, I am aware that all the cool kids are now using liblouisutdml.
>>>>>> And one day I hope to be a cool kid. <smiles> At the moment, however,
>>>>>> I have some existing software which depends upon liblouisxml and is
>>>>>> suffering from this bug. Thus any help you could provide would be most
>>>>>> appreciated.
>>>>>> 
>>>>>> Thanks in advance!
>>>>>> --joanie
>>>>>> 
>>>>> For a description of the software, to download it and links to
>>>>> project pages go to http://www.abilitiessoft.com
>>>> 
>>> 
>>> 
>>> For a description of the software, to download it and links to
>>> project pages go to http://www.abilitiessoft.com
>> 
>> For a description of the software, to download it and links to
>> project pages go to http://www.abilitiessoft.com
> 
> -- 
> John J. Boyer; President, Chief Software Developer
> Abilitiessoft, Inc.
> http://www.abilitiessoft.com
> Madison, Wisconsin USA
> Developing software for people with disabilities
> 
> For a description of the software, to download it and links to
> project pages go to http://www.abilitiessoft.com

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: