Hi Kang,

I don't think we should be connecting as often as we are.. I'll have to
look into that.

That said, Perforce and Review Board are used together at a great many
companies, and don't see the kind of login times you're seeing. This is
definitely abnormal, and should be so fast that you'd never even notice a
problem. It sounds like an issue on the Perforce side to me.

Is that Perforce server located within the same network? Do you have any
logs there that you can refer to?

Christian

-- 
Christian Hammond
President/CEO of Beanbag <https://www.beanbaginc.com/>
Makers of Review Board <https://www.reviewboard.org/>

On Mon, Apr 25, 2016 at 7:53 AM, Kangqiao Hu <kangqia...@gmail.com> wrote:

> Can anybody explain why it tries to login to perforce 3 times for each
> file instead of login only once and fetch all the files? Or do I
> misconfigure anything?
>
> Thanks
> Kang
>
>
> On Saturday, April 23, 2016 at 11:42:28 PM UTC-4, Kangqiao Hu wrote:
>>
>> I add the following lines to perforce.py:
>>
>> def _connect(self):
>>         """
>>         Connect to the perforce server.
>>
>>         This connects p4python to the remote server, optionally using a
>> stunnel
>>         proxy.
>>         """
>>         self.p4.user = self.username.encode('utf-8')
>>         self.p4.password = self.password.encode('utf-8')
>>
>>         if self.encoding:
>>             self.p4.charset = self.encoding.encode('utf-8')
>>
>>         self.p4.exception_level = 1
>>
>>         if self.use_stunnel:
>>             # Spin up an stunnel client and then redirect through that
>>             self.proxy = STunnelProxy(STUNNEL_CLIENT, self.p4port)
>>             self.proxy.start_client()
>>             p4_port = '127.0.0.1:%d' % self.proxy.port
>>         else:
>>             p4_port = self.p4port
>>
>>         self.p4.port = p4_port.encode('utf-8')
>>
>>         if self.p4host:
>>             self.p4.host = self.p4host.encode('utf-8')
>>
>>         *logging.debug("Start connecting")*
>>         self.p4.connect()
>>
>>         if self.use_ticket_auth:
>>             self.p4.run_login()
>>
>>         yield
>>         *logging.debug("Finish connecting")*
>>
>> and I've created a 6 file test case, I use rbt post to post this test
>> case, and it triggers log message "Start connecting" 18 times to complete
>> post. the time interval between "Start connecting" and "Finish connecting"
>> is 35 seconds average. This login time itself takes 35 * 18 = 630s = 10
>> minutes. This is my complete log:
>>
>> 2016-04-24 03:29:48,587 - DEBUG -  - DiffParser.parse: Beginning parse of
>> diff, size = 47582
>> 2016-04-24 03:29:48,600 - DEBUG -  - DiffParser.parse: Finished parsing
>> diff.
>> 2016-04-24 03:29:48,600 - DEBUG -  - Start connecting
>> 2016-04-24 03:30:10,578 - INFO -  - Reloading logging settings
>> 2016-04-24 03:30:10,579 - DEBUG -  - Logging to
>> /var/www/mysite/logs/reviewboard.log with a minimum level of DEBUG
>> 2016-04-24 03:30:11,094 - DEBUG -  - Finish connecting
>> 2016-04-24 03:30:11,095 - DEBUG -  - Start connecting
>> 2016-04-24 03:30:33,983 - DEBUG -  - Finish connecting
>> 2016-04-24 03:30:33,984 - DEBUG -  - Start connecting
>> 2016-04-24 03:30:57,060 - DEBUG -  - Finish connecting
>> 2016-04-24 03:30:57,061 - DEBUG -  - Start connecting
>> 2016-04-24 03:31:19,555 - DEBUG -  - Finish connecting
>> 2016-04-24 03:31:19,557 - DEBUG -  - Start connecting
>> 2016-04-24 03:31:42,130 - DEBUG -  - Finish connecting
>> 2016-04-24 03:31:42,132 - DEBUG -  - Start connecting
>> 2016-04-24 03:32:04,241 - DEBUG -  - Finish connecting
>> 2016-04-24 03:32:04,242 - DEBUG -  - Start connecting
>> 2016-04-24 03:32:26,769 - DEBUG -  - Finish connecting
>> 2016-04-24 03:32:26,769 - DEBUG -  - Start connecting
>> 2016-04-24 03:32:49,433 - DEBUG -  - Finish connecting
>> 2016-04-24 03:32:49,433 - DEBUG -  - Start connecting
>> 2016-04-24 03:33:12,423 - DEBUG -  - Finish connecting
>> 2016-04-24 03:33:12,839 - DEBUG -  - DiffParser.parse: Beginning parse of
>> diff, size = 47582
>> 2016-04-24 03:33:12,851 - DEBUG -  - DiffParser.parse: Finished parsing
>> diff.
>> 2016-04-24 03:33:12,852 - DEBUG -  - Start connecting
>> 2016-04-24 03:33:35,271 - DEBUG -  - Finish connecting
>> 2016-04-24 03:33:35,272 - DEBUG -  - Start connecting
>> 2016-04-24 03:33:58,132 - DEBUG -  - Finish connecting
>> 2016-04-24 03:33:58,133 - DEBUG -  - Start connecting
>> 2016-04-24 03:34:20,531 - DEBUG -  - Finish connecting
>> 2016-04-24 03:34:20,532 - DEBUG -  - Start connecting
>> 2016-04-24 03:34:43,300 - DEBUG -  - Finish connecting
>> 2016-04-24 03:34:43,302 - DEBUG -  - Start connecting
>> 2016-04-24 03:35:05,627 - DEBUG -  - Finish connecting
>> 2016-04-24 03:35:05,629 - DEBUG -  - Start connecting
>> 2016-04-24 03:35:11,578 - INFO -  - Reloading logging settings
>> 2016-04-24 03:35:11,579 - DEBUG -  - Logging to
>> /var/www/mysite/logs/reviewboard.log with a minimum level of DEBUG
>> 2016-04-24 03:35:29,214 - DEBUG -  - Finish connecting
>> 2016-04-24 03:35:29,215 - DEBUG -  - Start connecting
>> 2016-04-24 03:35:52,021 - DEBUG -  - Finish connecting
>> 2016-04-24 03:35:52,021 - DEBUG -  - Start connecting
>> 2016-04-24 03:36:15,000 - DEBUG -  - Finish connecting
>> 2016-04-24 03:36:15,000 - DEBUG -  - Start connecting
>> 2016-04-24 03:36:37,557 - DEBUG -  - Finish connecting
>> 2016-04-24 03:40:12,607 - INFO -  - Reloading logging settings
>> 2016-04-24 03:40:12,608 - DEBUG -  - Logging to
>> /var/www/mysite/logs/reviewboard.log with a minimum level of DEBUG
>>
>>
>> On Friday, April 22, 2016 at 9:38:56 AM UTC-4, Kangqiao Hu wrote:
>>>
>>> Thanks for the suggestions. I am using a user hosted perforce, which is
>>> using a proxy. I've tried configured the Perforce repository using both
>>> proxy and the original server address, and the results have no difference.
>>> Perforce server has enabled ticket based authentication, the log shows that
>>> file fetching time is around 29 secs (logged as critical), I have 6 files
>>> to fetch. But the fetching time is not that long every time, sometimes it
>>> just takes less than a sec. And the log shows that the diff generation is
>>> also finished within a second. But after the review request is created,
>>> it's blazing fast for people to load the review page and see the diff.
>>>
>>> The other thing I've noticed is that the time is proportion to the
>>> number of files to diff. I've tried another list with 15 files to diff and
>>> it takes 35 minutes.
>>>
>>>
>>> On Friday, April 22, 2016 at 6:27:24 AM UTC-4, Christian Hammond wrote:
>>>>
>>>> Given the size of the diff, he shouldn't see any problems with the diff
>>>> algorithm. It's almost certainly repository communication. We've seen a lot
>>>> of this before, often with slow Subversion repositories.
>>>>
>>>> Christian
>>>>
>>>> --
>>>> Christian Hammond
>>>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>>>> Makers of Review Board <https://www.reviewboard.org/>
>>>>
>>>> On Fri, Apr 22, 2016 at 12:48 AM, Michael Zhilin <miz...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Here is potential fix which possibly fix your problem. Patch for
>>>>> 2.5.1. but I think it will work for you too:
>>>>> https://reviews.reviewboard.org/r/8075/
>>>>>
>>>>> Thanks!
>>>>>
>>>>> On Fri, Apr 22, 2016 at 8:45 AM, Kangqiao Hu <kangq...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> I am running my 2.5.3 on a server and trying to create a new review
>>>>>> request by uploading a .patch file which 143k. But this takes more than 
>>>>>> 20
>>>>>> minutes to finish. When I am using rbt post, I notice "POST request to
>>>>>> http://myserver/api/validation/diffs/"; takes about 15 minutes. Is it
>>>>>> the expected runtime?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> --
>>>>>> Supercharge your Review Board with Power Pack:
>>>>>> https://www.reviewboard.org/powerpack/
>>>>>> Want us to host Review Board for you? Check out RBCommons:
>>>>>> https://rbcommons.com/
>>>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "reviewboard" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to reviewboard...@googlegroups.com.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>> --
>>>>> Supercharge your Review Board with Power Pack:
>>>>> https://www.reviewboard.org/powerpack/
>>>>> Want us to host Review Board for you? Check out RBCommons:
>>>>> https://rbcommons.com/
>>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "reviewboard" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to reviewboard...@googlegroups.com.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to