Skip to main content
Code Review

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Couple things I'd try:

..if you're making several requests to the same host, the underlying TCP connection will be reused, which can result in a significant performance increase

Some micro-optimization ideas:

  • move the hdr dictionary definition to the module level to avoid redefining it every time urlResolution() is called (and, since it is a constant use upper-case; and pick a more readable variable name - HEADERS?)

Couple things I'd try:

..if you're making several requests to the same host, the underlying TCP connection will be reused, which can result in a significant performance increase

Some micro-optimization ideas:

  • move the hdr dictionary definition to the module level to avoid redefining it every time urlResolution() is called (and, since it is a constant use upper-case; and pick a more readable variable name - HEADERS?)

Couple things I'd try:

..if you're making several requests to the same host, the underlying TCP connection will be reused, which can result in a significant performance increase

Some micro-optimization ideas:

  • move the hdr dictionary definition to the module level to avoid redefining it every time urlResolution() is called (and, since it is a constant use upper-case; and pick a more readable variable name - HEADERS?)
added 64 characters in body
Source Link
alecxe
  • 17.5k
  • 8
  • 52
  • 93

Couple things I'd try:

..if you're making several requests to the same host, the underlying TCP connection will be reused, which can result in a significant performance increase

Some micro-optimization ideas:

  • move the hdr dictionary definition to the module level to avoid redefining it every time urlResolution() is called (and, since it is a constant use upper-case; and pick a more readable variable name - HEADERS?)

Couple things I'd try:

..if you're making several requests to the same host, the underlying TCP connection will be reused, which can result in a significant performance increase

Some micro-optimization ideas:

  • move the hdr dictionary definition to the module level to avoid redefining it every time urlResolution() is called (and, since it is a constant use upper-case; and pick a more readable variable name - HEADERS?)

Couple things I'd try:

..if you're making several requests to the same host, the underlying TCP connection will be reused, which can result in a significant performance increase

Some micro-optimization ideas:

  • move the hdr dictionary definition to the module level to avoid redefining it every time urlResolution() is called (and, since it is a constant use upper-case; and pick a more readable variable name - HEADERS?)
Source Link
alecxe
  • 17.5k
  • 8
  • 52
  • 93

Couple things I'd try:

..if you're making several requests to the same host, the underlying TCP connection will be reused, which can result in a significant performance increase

Some micro-optimization ideas:

  • move the hdr dictionary definition to the module level to avoid redefining it every time urlResolution() is called (and, since it is a constant use upper-case; and pick a more readable variable name - HEADERS?)
lang-py

AltStyle によって変換されたページ (->オリジナル) /