Code Bottleneck Approach

All,

Given a code that you are completely unaware of in terms of functionality and implementation, how would you find performance bottlenecks in this code? Please list any specific tools / standard approaches that you can use.

+3
source share
5 answers

I assume that you have the source code, and you can run it under the debugger and that there is a pause button (or Ctrl-C or Esc), with which you can simply stop it on your tracks.

, , , 10 20, , , - , , .

- , , .

, , , 20%, 50%, 90% , - , . , () . , . 1 .

flak profiler-aficionados, , , , . . , . .

, , Zoom LTProf, , .

.

+2

, :

  • .NET: Visual Studio, JetBrains dotTrace
  • Java: JProfiler

, . , Visual Studio .

, , . :

  • (, / )
  • , .
  • , , , , ,
  • / .
  • , .

, , .

, . - , , , , .

+2

. ( , , ). . . , . , , .

, . , . , , -, , .

. , , . , -, , .

+1

, , :

  • , : 10 , 100 100- ...

  • "" : , , , .

  • , . , , . , , , .

  • oh - , ! , .

0

, :

  • , , . ( , , .)
  • (, dotTrace/Compuware) (, SQL Profiler, NHibernate Profiler, , ). .
  • , , .

This should give you a pretty good picture of several database queries that need to be combined into one or code that can be removed from an internal loop or pre-computed, etc.

0
source

Source: https://habr.com/ru/post/1769896/


All Articles