#30707: why it took 30s when call sorted function in django server sometimes
               Reporter:  liumilan   |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Component:  Testing    |        Version:  2.2
  framework                          |
               Severity:  Normal     |       Keywords:  sorted function
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
 I add some logic in django . And when i sent requests to server,i found
 some requests are handled so slowly,and then find it will take much time
 when call sorted function.But it is stranged that if i sent this wired
 data to server alone,it is ok,only take 100ms.Does the sorted function has
 confict with django?

 def recall(word):
         dict_result = {}
         word_fields = word.split(":")
         for i in range(0,len(word_fields)):
         pre_result = sorted(dict_result.items(),

         return recall_tag[:-1]

 client code is:
   for line in sys.stdin:
                 line = line.rstrip('\n')
                 fields = line.split("\t")
                 id = fields[0]
                 title = fields[1]
                 page_params_mq = {'id':vid,'title':title}
                 try :
                         rec_mq_res = get_rec(server_ip_mq, server_port_mq,
 web_page_mq, page_params_mq)
                         print (line)
 I run
 cat test_data|python client.py
 if there is only one data in test_data file,it is ok.If there are many
 data,it will occur randomly slowly

Ticket URL: <https://code.djangoproject.com/ticket/30707>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to