Skip to main content
Code Review

Return to Answer

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

Use batches

One of the issue I can see is that you are handling CSV file line-by-line. You should consider batching your requests to ensure you are sending queries to MySQL batched for better performance. You may be surprised with performance improvement.

See here - also search how to send queries to MySQL in batches: http://stackoverflow.com/a/5526937/2075157 https://stackoverflow.com/a/5526937/2075157

A few comments

  • Don't hard-code path-separators even if you are planning to run on windows only. See: https://docs.python.org/2/library/os.html#os.pathsep

    conf_file = currdir + "\Config\config.ini"

  • Use format function "exception on {0}!".format(option) instead of % when formatting strings for output - this is industry standard.

Minor

  • formatting is off and not-consistent: like space after comma-separator between method arguments is not consistent - choose one standard and follow it.

Good parts

  • logging is done great

Use batches

One of the issue I can see is that you are handling CSV file line-by-line. You should consider batching your requests to ensure you are sending queries to MySQL batched for better performance. You may be surprised with performance improvement.

See here - also search how to send queries to MySQL in batches: http://stackoverflow.com/a/5526937/2075157

A few comments

  • Don't hard-code path-separators even if you are planning to run on windows only. See: https://docs.python.org/2/library/os.html#os.pathsep

    conf_file = currdir + "\Config\config.ini"

  • Use format function "exception on {0}!".format(option) instead of % when formatting strings for output - this is industry standard.

Minor

  • formatting is off and not-consistent: like space after comma-separator between method arguments is not consistent - choose one standard and follow it.

Good parts

  • logging is done great

Use batches

One of the issue I can see is that you are handling CSV file line-by-line. You should consider batching your requests to ensure you are sending queries to MySQL batched for better performance. You may be surprised with performance improvement.

See here - also search how to send queries to MySQL in batches: https://stackoverflow.com/a/5526937/2075157

A few comments

  • Don't hard-code path-separators even if you are planning to run on windows only. See: https://docs.python.org/2/library/os.html#os.pathsep

    conf_file = currdir + "\Config\config.ini"

  • Use format function "exception on {0}!".format(option) instead of % when formatting strings for output - this is industry standard.

Minor

  • formatting is off and not-consistent: like space after comma-separator between method arguments is not consistent - choose one standard and follow it.

Good parts

  • logging is done great
Source Link

Use batches

One of the issue I can see is that you are handling CSV file line-by-line. You should consider batching your requests to ensure you are sending queries to MySQL batched for better performance. You may be surprised with performance improvement.

See here - also search how to send queries to MySQL in batches: http://stackoverflow.com/a/5526937/2075157

A few comments

  • Don't hard-code path-separators even if you are planning to run on windows only. See: https://docs.python.org/2/library/os.html#os.pathsep

    conf_file = currdir + "\Config\config.ini"

  • Use format function "exception on {0}!".format(option) instead of % when formatting strings for output - this is industry standard.

Minor

  • formatting is off and not-consistent: like space after comma-separator between method arguments is not consistent - choose one standard and follow it.

Good parts

  • logging is done great
default

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