[bt-devel] Threads / New idea for versformatting

Martin Gruner bt-devel@crosswire.org
Mon, 4 Sep 2000 16:05:18 +0200


Hi Joachim,

On Sam, 02 Sep 2000, you wrote:
> Hi!
>
> > Hi,
> >
> > On Mit, 30 Aug 2000, you wrote:
> > > Hi all!
> > >
> > > First: Martin how is the thread which was created by CModuleSearch
> > > deleted? I do not see that it disappears (->2 BibleTime entries in
> > > top).
> >
> > It is deleted when it finishes the main thread function. The 2 in top
> > must have to do with the posix threads implementation, but i am not sure.
>
> Somehow the second thread is never deleted! Sometimes I even have three or
> more!

Please look at the manual pages for pthread_create and pthread_attr_init.
I set the thread to be detached, so they should be deleted automatically.

>
> > > 1.0 should be improved in speed and memory footprint.
> >
> > Very good idea. Just look at the memory footprint while performing
> > several searches. It is staedily growing - needs to be changed.
>
> I fixed some huge leaks (items of lists were just removed not deleted,
> please speak up if you notice some strange behaviour). The required mem
> doesn't grow after using multiple searches.
> But it's no enough! We have to optimize more! 18MB in top are really much!

AGREED.

>
> > > A idea I had today:
> > >
> > > How about introducing verse-formatting styles?
> > > If we do it you can choose between some predefined styles, e.g.
> > >
> > > -Our traditional way (Line breaks, verse numbers)
> > > -No versenumbers, no breaks etc.
> > > -Some nice HTML formatting
> > >
> > > The verse-styles should be similair to the printing styles.
> > >
> > > I like the idea but I can't find the proper words to decsrib eit
> > > properly in english! What do you think?
> >
> > Good Idea. What about user definable styles? Users yould configure the
> > verse appearance using placeholders like %t for the verse text and %n for
> > the number - just ideas.
>
> Yes, good. But my idea was to hold it simple and easy to use. Don't know if
> all Newbies can work with the placeholders etc.
> What do you think?

We could have this as an option, so that the users could choose between 
predefined ones and can customize their own styles. Maybe they could choose 
one style for printing, one for the presenters. We could even have one style 
per module...

>
> No Martin, I hav not forgotten to send you some notes about the key-chooser
> widget, but school is very time consuming. I'll try to send them this
> weekend.

Please do it! Can I do something else in between?
>
> --Joachim

BTW: will we use QT Designer? I suggest it.

Martin