[GSoC] Integrating LO with GNOME - WR#8

Michael Meeks michael.meeks at collabora.com
Mon Jul 20 02:46:38 PDT 2015


Hi Pranav,

On Mon, 2015-07-20 at 01:04 +0530, Pranav Kant wrote:
> This week I made few enhancements to the threading infrastructure that
> I coded last week taking inspiration from Libreoffice Android. Now I
> am making use of a thread pool, instead of creating a new thread(s)
> everytime. All the LOK calls are now being called in thread(s) reused
> from this pool.

	Hah =) so one thing that makes this particularly non-useful is the fact
that LibreOfficeKit is single-plus-epsilon threaded ;-)

	So you'll get no useful benefit from using more than a single thread.

> I was facing few problems initially with making paintTile calls async,
> but following Michael's advice, and revisiting the code, I found a
> minor memory glitch which was preventing it to work like we expected.

	=) great.

> I have pushed the working patches to feature/gsoc-tiled-rendering
> (needs little bit of polishing, though, before merging). The tiles are
> being rendered asynchronously now. However, I am bit worried about the
> lag that we are facing sometimes, of which I will try to find the
> actual cause.

	So - what I would do is abandon the thread-pool.

	Instead I would have a simple queue that you can push work to in both
threads - a very small critical section to push things into and across
that queue. One thread for UI, and one thread for LOK.

	You can use LOK from multiple threads (if you're lucky) but it won't
give any advantage.

	HTH,

		Michael.

-- 
 michael.meeks at collabora.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list