You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Niclas Lockner <ni...@gmail.com> on 2013/09/19 11:59:35 UTC

Thrift compiler takes long time to run

Hi,

When I run the Thrift compiler, it takes about 6.5 minutes on my Core i7 to
complete. Is this normal for a not-too-complicated input file? The input
file can be found here: http://pastebin.com/H5Uj74aW

After looking in the code, I found that it's the "generate_fingerprint"
function for structs that takes time. What is happening in this stage and
why does it take so long time to complete?

/ Niclas Lockner

Re: Thrift compiler takes long time to run

Posted by Jens Geyer <je...@hotmail.com>.
  // Return a string that uniquely identifies this type
  // from any other thrift type in the world, as far as
  // TDenseProtocol is concerned.
  // We don't cache this, which is a little sloppy,
  // but the compiler is so fast that it doesn't really matter.

That's for the wrong assumptions, hehe.



-----Ursprüngliche Nachricht----- 
From: Jens Geyer
Sent: Thursday, September 19, 2013 10:30 PM
To: user@thrift.apache.org
Subject: Re: Thrift compiler takes long time to run

No that's strange, I can reproduce it.


-----Ursprüngliche Nachricht----- 
From: Niclas Lockner
Sent: Thursday, September 19, 2013 11:59 AM
To: user@thrift.apache.org
Subject: Thrift compiler takes long time to run

Hi,

When I run the Thrift compiler, it takes about 6.5 minutes on my Core i7 to
complete. Is this normal for a not-too-complicated input file? The input
file can be found here: http://pastebin.com/H5Uj74aW

After looking in the code, I found that it's the "generate_fingerprint"
function for structs that takes time. What is happening in this stage and
why does it take so long time to complete?

/ Niclas Lockner


Re: Thrift compiler takes long time to run

Posted by Jens Geyer <je...@hotmail.com>.
No that's strange, I can reproduce it.


-----Ursprüngliche Nachricht----- 
From: Niclas Lockner
Sent: Thursday, September 19, 2013 11:59 AM
To: user@thrift.apache.org
Subject: Thrift compiler takes long time to run

Hi,

When I run the Thrift compiler, it takes about 6.5 minutes on my Core i7 to
complete. Is this normal for a not-too-complicated input file? The input
file can be found here: http://pastebin.com/H5Uj74aW

After looking in the code, I found that it's the "generate_fingerprint"
function for structs that takes time. What is happening in this stage and
why does it take so long time to complete?

/ Niclas Lockner 


Re: Thrift compiler takes long time to run

Posted by Niclas Lockner <ni...@gmail.com>.
Hi Jens,

That explains it. Thank you for the answer and for taking the time to fix
it.

Niclas


2013/9/20 Jens Geyer <je...@hotmail.com>

> Hi Niclas,
>
> thanks for spotting the issue, and for the nice testcase.
>
> https://issues.apache.org/**jira/browse/THRIFT-2200<https://issues.apache.org/jira/browse/THRIFT-2200>
>
> JensG
>
>
>
> -----Ursprüngliche Nachricht----- From: Niclas Lockner
> Sent: Thursday, September 19, 2013 11:59 AM
> To: user@thrift.apache.org
> Subject: Thrift compiler takes long time to run
>
> Hi,
>
> When I run the Thrift compiler, it takes about 6.5 minutes on my Core i7 to
> complete. Is this normal for a not-too-complicated input file? The input
> file can be found here: http://pastebin.com/H5Uj74aW
>
> After looking in the code, I found that it's the "generate_fingerprint"
> function for structs that takes time. What is happening in this stage and
> why does it take so long time to complete?
>
> / Niclas Lockner
>

Re: Thrift compiler takes long time to run

Posted by Jens Geyer <je...@hotmail.com>.
Hi Niclas,

thanks for spotting the issue, and for the nice testcase.

https://issues.apache.org/jira/browse/THRIFT-2200

JensG


-----Ursprüngliche Nachricht----- 
From: Niclas Lockner
Sent: Thursday, September 19, 2013 11:59 AM
To: user@thrift.apache.org
Subject: Thrift compiler takes long time to run

Hi,

When I run the Thrift compiler, it takes about 6.5 minutes on my Core i7 to
complete. Is this normal for a not-too-complicated input file? The input
file can be found here: http://pastebin.com/H5Uj74aW

After looking in the code, I found that it's the "generate_fingerprint"
function for structs that takes time. What is happening in this stage and
why does it take so long time to complete?

/ Niclas Lockner