PetitJava performance

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

PetitJava performance

Stephan Eggermont-3
While working on PetitDelphi, we noticed significant performance
problems. As PetitDelphi copied the design of PetitJava, we found
the same root cause.

When creating a new java parser, a significant amount of time is spend
on initialization, especially the creation of parsers for keywords, separators and
operators. The introduction of a lexicon cache allows the tests to run
significantly faster. 2230 ms to 224ms  the second time.

PetitJava-DiegoLont.115

Yuriy, can you merge?

Stephan


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitJava performance

EstebanLM
wow :)

On Jun 19, 2013, at 4:09 PM, Stephan Eggermont <[hidden email]> wrote:

> While working on PetitDelphi, we noticed significant performance
> problems. As PetitDelphi copied the design of PetitJava, we found
> the same root cause.
>
> When creating a new java parser, a significant amount of time is spend
> on initialization, especially the creation of parsers for keywords, separators and
> operators. The introduction of a lexicon cache allows the tests to run
> significantly faster. 2230 ms to 224ms  the second time.
>
> PetitJava-DiegoLont.115
>
> Yuriy, can you merge?
>
> Stephan
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitJava performance

Uko2
Hi,

I'd like to merge, but right now I'm on vacation and do not have laptop with me. I'll be back on next weekend. Maybe Benjamin Arezki can take a look as he will be working on FAST for Java which also means working with PetitJava.

Uko

Надіслано з iPhone

19 черв. 2013 о 16:17 Esteban Lorenzano <[hidden email]> написав(ла):

> wow :)
>
> On Jun 19, 2013, at 4:09 PM, Stephan Eggermont <[hidden email]> wrote:
>
>> While working on PetitDelphi, we noticed significant performance
>> problems. As PetitDelphi copied the design of PetitJava, we found
>> the same root cause.
>>
>> When creating a new java parser, a significant amount of time is spend
>> on initialization, especially the creation of parsers for keywords, separators and
>> operators. The introduction of a lexicon cache allows the tests to run
>> significantly faster. 2230 ms to 224ms  the second time.
>>
>> PetitJava-DiegoLont.115
>>
>> Yuriy, can you merge?
>>
>> Stephan
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitJava performance

Stephan Eggermont-3
In reply to this post by Stephan Eggermont-3
Yuriy,

Ok, I'm not in a hurry. Please note that your latest version is out of sync
since PetitJava-MartinDias.104, and there are lots of versions to merge
by cbc & ChrisCunningham. Automerge fails.

Stephan
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitJava performance

Uko2
Yes, I know, I have to talk to Chris, as he introduced a lot of strange nodes to AST, and I couldn't figure out why.

Надіслано з iPhone

20 черв. 2013 о 14:09 Stephan Eggermont <[hidden email]> написав(ла):

> Yuriy,
>
> Ok, I'm not in a hurry. Please note that your latest version is out of sync
> since PetitJava-MartinDias.104, and there are lots of versions to merge
> by cbc & ChrisCunningham. Automerge fails.
>
> Stephan
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
cbc
Reply | Threaded
Open this post in threaded view
|

Re: PetitJava performance

cbc
Hi Yuriy,

The why is easy: I couldn't make sense of the deeply nested arrays that were present in the parts of the parsed code that weren't modeled in the existing AST, so I tried to make a model that I could have a chance of navigating.

As to the nodes themselves:
 - some of them were already there, and I just hooked them up to the parsers.
 - some I would claim aren't strange (such as the ForStatementNode),and probably don't deserve the label 'strange'.
 - several really do deserve the label 'strange', though.  These were ones where I wasn't sure what was being parsed out, and just blindly followed the parser naming convention.  This is where the odd/strange nodes like PrimaryWithSelector came from.  That one, at least, has been removed with a better set of nodes to replace it (MethodInvocationNode and VariableAccessorNode).  The rest have not been rethought to make their usage clearer.

Going forward, I plan on removing some of the nodes (PJArguments and PJTypeArguments should just be an array in the containing node; PJThisIdentifierNode and PJSuperIdentifierNode were probably bad ideas to begin with); and re-think at least one of the others: PJClassOrInterfaceNode.  If there are others that are still strange, please let me know which.

Interestingly, Stephan has commented most of the other nodes - thanks!

-Chris


On Thu, Jun 20, 2013 at 5:52 AM, Yuriy Tymchuk <[hidden email]> wrote:
Yes, I know, I have to talk to Chris, as he introduced a lot of strange nodes to AST, and I couldn't figure out why.

Надіслано з iPhone

20 черв. 2013 о 14:09 Stephan Eggermont <[hidden email]> написав(ла):

> Yuriy,
>
> Ok, I'm not in a hurry. Please note that your latest version is out of sync
> since PetitJava-MartinDias.104, and there are lots of versions to merge
> by cbc & ChrisCunningham. Automerge fails.
>
> Stephan
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitJava performance

Stephan Eggermont-3
In reply to this post by Stephan Eggermont-3
Chris wrote:
>Interestingly, Stephan has commented most of the other nodes - thanks!

Can't claim that. We tried merging with the last version and had conflicts.
We then used an earlier version that merged. Good to see it working though.

I noticed you're committing as both cbc and ChrisCunningham?
Seems to confuse smalltalkhub (it can't find user ChrisCunningham).

Stephan
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
cbc
Reply | Threaded
Open this post in threaded view
|

Re: PetitJava performance

cbc



On Thu, Jun 20, 2013 at 10:44 AM, Stephan Eggermont <[hidden email]> wrote:
I noticed you're committing as both cbc and ChrisCunningham?
Seems to confuse smalltalkhub (it can't find user ChrisCunningham).

It depends on which image I'm making the changes in - usually cbc is from a Squeak image, while ChrisCunningham is from the Moose image (because the Pharo folks prompt heavily for a full name usage).  It helps me keep track of where the change occurred.

I was going to ask why it matters - but I think I've figured it out. SmalltalkHub won't show a commit by a non-registered user.  Interesting, that.
While poking around, I noticed that I can't see who else is a 'contributer' for this package on SmalltalkHub - only myself.  I can of course guess by the names on the packages that show up in the commits tab.

-Chris

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
cbc
Reply | Threaded
Open this post in threaded view
|

Re: PetitJava performance

cbc
Hi Stephan,

I have merged Yuriy's branch and your's together - and removed a couple of nodes that I introduced.  I do enjoy the speed-up.

Yuriy: the merge was to include your alterations into my expanded nodes branch.  It wasn't the other way around - to include Stephan's speed up into your original branch.  Just an FYI.

-Chris


On Thu, Jun 20, 2013 at 1:52 PM, Chris Cunningham <[hidden email]> wrote:



On Thu, Jun 20, 2013 at 10:44 AM, Stephan Eggermont <[hidden email]> wrote:
I noticed you're committing as both cbc and ChrisCunningham?
Seems to confuse smalltalkhub (it can't find user ChrisCunningham).

It depends on which image I'm making the changes in - usually cbc is from a Squeak image, while ChrisCunningham is from the Moose image (because the Pharo folks prompt heavily for a full name usage).  It helps me keep track of where the change occurred.

I was going to ask why it matters - but I think I've figured it out. SmalltalkHub won't show a commit by a non-registered user.  Interesting, that.
While poking around, I noticed that I can't see who else is a 'contributer' for this package on SmalltalkHub - only myself.  I can of course guess by the names on the packages that show up in the commits tab.

-Chris


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitJava performance

Uko2
Yes, I noticed that PetitJava was changed as FAST builds became red. Now Benjamin has to start his work from understanding the cause of the problem. Morale: things have to be done right way. But I just didn't have enough time.

Надіслано з iPhone

22 черв. 2013 о 01:38 Chris Cunningham <[hidden email]> написав(ла):

Hi Stephan,

I have merged Yuriy's branch and your's together - and removed a couple of nodes that I introduced.  I do enjoy the speed-up.

Yuriy: the merge was to include your alterations into my expanded nodes branch.  It wasn't the other way around - to include Stephan's speed up into your original branch.  Just an FYI.

-Chris


On Thu, Jun 20, 2013 at 1:52 PM, Chris Cunningham <[hidden email]> wrote:



On Thu, Jun 20, 2013 at 10:44 AM, Stephan Eggermont <[hidden email]> wrote:
I noticed you're committing as both cbc and ChrisCunningham?
Seems to confuse smalltalkhub (it can't find user ChrisCunningham).

It depends on which image I'm making the changes in - usually cbc is from a Squeak image, while ChrisCunningham is from the Moose image (because the Pharo folks prompt heavily for a full name usage).  It helps me keep track of where the change occurred.

I was going to ask why it matters - but I think I've figured it out. SmalltalkHub won't show a commit by a non-registered user.  Interesting, that.
While poking around, I noticed that I can't see who else is a 'contributer' for this package on SmalltalkHub - only myself.  I can of course guess by the names on the packages that show up in the commits tab.

-Chris

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev