belgattitude / php-java-bridge

Soluble PHP/Java bridge server (unofficial fork)
Other
45 stars 10 forks source link

Research how to improve the Parser (xml) #45

Closed belgattitude closed 7 years ago

belgattitude commented 7 years ago

For research and new ideas, we can take a look at the Parser.java

It might be interesting to see if we could have some perf increase in that area.

All ideas and comment welcome

cplerch commented 7 years ago

The Parser looks to me handcrafted and highly optimized. Just by code review I couldn't identify any possible performance bottlenecks. If you suspect any issues we could run the profiler on it, but I believe it wont show much if any problems.

2017-03-02 11:12 GMT+01:00 Sébastien Vanvelthem notifications@github.com:

For research and new ideas, we can take a look at the Parser.java https://github.com/belgattitude/php-java-bridge/blob/master/src/main/java/io/soluble/pjb/bridge/Parser.java

It might be interesting to see if we could have some perf increase in that area.

All ideas and comment welcome

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/belgattitude/php-java-bridge/issues/45, or mute the thread https://github.com/notifications/unsubscribe-auth/AIA12xhkD3fdA6KX6_131y1_YBC2Vk5yks5rhpYegaJpZM4MQynY .

belgattitude commented 7 years ago

Thanks @cplerch nice to hear

belgattitude commented 7 years ago

Hi @cplerch,

FIY I'm trying to improve the client part (soluble-japha) and started basic profiling (I'm using blackfire.io) for common uses cases. It's very early but I'll try some research on the parser (php) and see if I can get rid of base64 encodings with recent php versions.

From what I've seen with the profiler I can eventually have some performance gains... I'll get back to you when I have something...

For the moment, I've prepared some benchmarks : http://docs.soluble.io/soluble-japha/bridge_benchmarks/#simple-benchmark and the code: https://github.com/belgattitude/soluble-japha/blob/master/test/bench/simple_benchmarks.php to be able to compare. Still need to create tests with UTF8 / UTF16 content to be sure.

I let you know but always glad to hear your comments

cplerch commented 7 years ago

Sorry, a little misunderstanding: I was looking at Parser.java, not the PHP parser.

2017-03-02 21:24 GMT+01:00 Sébastien Vanvelthem notifications@github.com:

Hi @cplerch https://github.com/cplerch,

FIY I'm trying to improve the client part (soluble-japha) and started basic profiling (I'm using blackfire.io) for common uses cases. It's very early but I'll try some research on the parser https://github.com/belgattitude/soluble-japha/blob/master/src/Soluble/Japha/Bridge/Driver/Pjb62/NativeParser.php#L104 (php) and see if I can get rid of base64 encodings with recent php versions.

From what I've seen with the profiler I can eventually have some performance gains... I'll get back to you when I have something...

For the moment, I've prepared some benchmarks : http://docs.soluble.io/ soluble-japha/bridge_benchmarks/#simple-benchmark and the code: https://github.com/belgattitude/soluble-japha/ blob/master/test/bench/simple_benchmarks.php to be able to compare. Still need to create tests with UTF8 / UTF16 content to be sure.

I let you know but always glad to hear your comments

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/belgattitude/php-java-bridge/issues/45#issuecomment-283769355, or mute the thread https://github.com/notifications/unsubscribe-auth/AIA123erLVTcUny-IIRWnMbrmJMSdj52ks5rhyVugaJpZM4MQynY .

belgattitude commented 7 years ago

Hi @chris, my english is still unclear ;) And you're right I was talking about the java but from the php client perspective.

I tried to improve the perf, removing the base64 encoding (HexBuffer instead). Till now no notable perf change... I'll have a look later. Closing this for now.