Projects tigase _server server-core Issues #530
PEP plugin code optimization (#530)
Closed
Artur Hefczyc opened 9 years ago
Due Date
2015-08-30

After code review I find a few places which might need some improvements:

  1. forward method appears to be not used. It may have a bug in the code but instead of fixing the bug we can just remove the method.

  2. processPEPPublish method creates a new Element objects on every method execution. It might be more optimal to have a static field with Element object which is then cloned when necessary.

  3. Message object should be created using tigase.server.Message API. Also, when a Packet object is created (either through Packet API or Message API), passing from, to fields is redundant if these attributes are already set for the Element object. It cases the Packet API to check some stuff and reset them for the Element again.

  4. from.toString() multiple times, might be optimized, or avoided following comments above.

Please take a look at these possible optimizations.

Andrzej Wójcik (Tigase) commented 9 years ago

I can make this changes as you suggest but PepPlugin from Tigase XMPP Server was not used during tests executed in #3307 as this processor has id of pep-simple. This is simplified PEP support when Tigase PubSub Component is not used or not expected to be used.

In test #3307 we used pep processor (@PepPlugin@ from Tigase PubSub Component) and it's performance was tested.

Due to that I do not think we should now take care of pep-simple processor now, however I can apply changes you suggested. I think looking at pep processor would be better as it's performance was not as good as expected in tests from #3307. I'm open for your suggestions for optimizations in pep processor (@PepPlugin@ from Tigase PubSub Component project).

Artur Hefczyc commented 9 years ago

If this plugin was not used during last LT then we do not need to optimize it right now. It can wait for a later time. Please review the PubSub plugin if there is any room for optimization then.

Andrzej Wójcik (Tigase) commented 9 years ago

I changed processing of presences by plugin to improve performance and remove from forwarding presences which will not result in sending PEP event messages.

However I do not think it will help a lot as as lot of presence stanzas needs to be forwarded to PubSub component (including presence for offline contacts, etc.)

issue 1 of 1
Type
Task
Priority
Minor
Assignee
RedmineID
3328
Spent time
27h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#530
Please wait...
Page is in error, reload to recover