Issue 118449

Summary: notifyListeners() method in io/source is called during each IPC and eats much time
Product: udk Reporter: olistraub <openoffice>
Component: codeAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Normal    
Priority: P5 (lowest) CC: issues, knmc
Version: 3.4.0 Beta (OOo)   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Latest Confirmation in: ---
Developer Difficulty: ---

Description olistraub 2011-09-14 07:05:48 UTC
notifyListeners() in ./source/connector/ctr_socket.cxx and ./source/acceptor/acc_socket.cxx takes a mutex, copies a hash_set and then iterates over the hash_set.

This method seems to be called during each IPC (if not multiple times per IPC).

Copying a hash_set is very expensive, as is iterating over a hash_set. Even if the hash_set is empty, it takes a considerable amount of CPU cycles.

The hash_set in these methods is filled by XStreamListener::addStreamListener. Within the AOOo code base, I only found implementers of this method, but noone that's actually calling it.

I'd suggest the following:
1) remove the functionality -> major IPC speedup
2) change code from hash_set to a normal vector, optimize code to check vector size before doing anything
Comment 1 Oliver-Rainer Wittmann 2012-06-13 12:24:10 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.
Comment 2 Keith N. McKenna 2016-10-23 18:34:34 UTC
The description sounds more like an Enhancement request than an actual defect. Changing Issue Type to Enhancement.