[Libreoffice-commits] online.git: 2 commits - loolwsd/Makefile.am loolwsd/MessageQueue.cpp

2016-09-30 Thread Jan Holesovsky
 loolwsd/Makefile.am  |9 -
 loolwsd/MessageQueue.cpp |4 
 2 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 2e3f297c8ae28b0d481a7600e81a4dbf5c080146
Author: Jan Holesovsky 
Date:   Fri Sep 30 23:53:48 2016 +0200

Add a callgrind target too.

Change-Id: Ib04e3ccd136766f9d8eb4f99e711390cb09eeb31

diff --git a/loolwsd/Makefile.am b/loolwsd/Makefile.am
index 295d120..2bd5701 100644
--- a/loolwsd/Makefile.am
+++ b/loolwsd/Makefile.am
@@ -154,12 +154,19 @@ run: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp
  --o:child_root_path="@JAILS_PATH@" 
--o:storage.filesystem[@allow]=true \
  --o:admin_console.username=admin 
--o:admin_console.password=admin
 
-run_valgrind: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp
+run-valgrind: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp
@echo "Launching loolwsd under valgrind (but not forkit/loolkit, yet)"
valgrind --tool=memcheck --trace-children=no -v --read-var-info=yes \
./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" 
--o:lo_template_path="@LO_PATH@" \
  --o:child_root_path="@JAILS_PATH@" 
--o:storage.filesystem[@allow]=true \
  --o:admin_console.username=admin 
--o:admin_console.password=admin
+
+run-callgrind: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp
+   @echo "Launching loolwsd under valgrind (but not forkit/loolkit, yet)"
+   valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes 
--num-callers=50 --error-limit=no \
+   ./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" 
--o:lo_template_path="@LO_PATH@" \
+ --o:child_root_path="@JAILS_PATH@" 
--o:storage.filesystem[@allow]=true \
+ --o:admin_console.username=admin 
--o:admin_console.password=admin
 else
 
 SYSTEM_STAMP =
commit 9c5967a432888ce2c4519552746055938e9f5782
Author: Jan Holesovsky 
Date:   Fri Sep 30 23:06:26 2016 +0200

Early break when we have found the highest priority tile.

Change-Id: I47f00dfb67c1a713b1c7fa9fef7a9cc8c59bde00

diff --git a/loolwsd/MessageQueue.cpp b/loolwsd/MessageQueue.cpp
index 0a49051..f06f670 100644
--- a/loolwsd/MessageQueue.cpp
+++ b/loolwsd/MessageQueue.cpp
@@ -211,6 +211,10 @@ MessageQueue::Payload TileQueue::get_impl()
 prioritySoFar = p;
 prioritized = i;
 msg = prio;
+
+// found the highest priority already?
+if (prioritySoFar == static_cast(_viewOrder.size()) - 1)
+break;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loolwsd/Makefile.am loolwsd/MessageQueue.cpp

2015-12-17 Thread Jan Holesovsky
 loolwsd/Makefile.am  |3 +++
 loolwsd/MessageQueue.cpp |2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 1fb94f0abb84e586542e7c097726f4340f4c2b3d
Author: Jan Holesovsky 
Date:   Thu Dec 17 18:49:34 2015 +0100

loolwsd: We want to build and link with -pthread.

diff --git a/loolwsd/Makefile.am b/loolwsd/Makefile.am
index 357986d..cfc3f41 100644
--- a/loolwsd/Makefile.am
+++ b/loolwsd/Makefile.am
@@ -4,6 +4,9 @@ bin_PROGRAMS = loolwsd
 
 dist_bin_SCRIPTS = loolwsd-systemplate-setup
 
+AM_CPPFLAGS = -pthread
+AM_LDFLAGS = -pthread
+
 loolwsd_SOURCES = LOOLWSD.cpp LOOLSession.cpp MessageQueue.cpp TileCache.cpp 
Util.cpp LOOLProtocol.cpp
 
 noinst_PROGRAMS = loadtest connect lokitclient
commit dacd176c84462ee3ad3744be2b6d5f97af972d8b
Author: Jan Holesovsky 
Date:   Thu Dec 17 18:47:58 2015 +0100

loolwsd: We wanted to call the _impl() version.

This was in preparation for a more complex Queue; maybe we should just 
remove
the non-needed _impl() versions again (?)

diff --git a/loolwsd/MessageQueue.cpp b/loolwsd/MessageQueue.cpp
index 65fd0e5..8e28585 100644
--- a/loolwsd/MessageQueue.cpp
+++ b/loolwsd/MessageQueue.cpp
@@ -34,7 +34,7 @@ std::string MessageQueue::get()
 void MessageQueue::clear()
 {
 std::unique_lock lock(_mutex);
-_queue.clear();
+clear_impl();
 }
 
 void MessageQueue::put_impl(const std::string& value)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits