mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
PY-72210 DataView: improve speed of get_value_occurrences_count
1. Split additional computation for statistics and computation for visualizations 2. Computation for visualization is now called only by request GitOrigin-RevId: d872fbd9ed5732633814228713acc734ee2043e5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
39e19fc02c
commit
238ebb61de
@@ -10,6 +10,7 @@ class TableCommandType:
|
||||
DF_INFO = "DF_INFO"
|
||||
SLICE = "SLICE"
|
||||
DESCRIBE = "DF_DESCRIBE"
|
||||
HISTOGRAM_DATA = "HISTOGRAM_DATA"
|
||||
|
||||
|
||||
def is_error_on_eval(val):
|
||||
@@ -49,10 +50,11 @@ def exec_table_command(init_command, command_type, start_index, end_index, f_glo
|
||||
res.append(NEXT_VALUE_SEPARATOR)
|
||||
res.append(table_provider.get_value_counts(table))
|
||||
res.append(NEXT_VALUE_SEPARATOR)
|
||||
|
||||
elif command_type == TableCommandType.HISTOGRAM_DATA:
|
||||
res.append(table_provider.get_value_occurrences_count(table))
|
||||
res.append(NEXT_VALUE_SEPARATOR)
|
||||
|
||||
|
||||
elif command_type == TableCommandType.SLICE:
|
||||
res.append(table_provider.get_data(table, start_index, end_index))
|
||||
|
||||
|
||||
@@ -4,5 +4,8 @@ import com.intellij.openapi.util.IntellijInternalApi
|
||||
|
||||
@IntellijInternalApi
|
||||
enum class TableCommandType {
|
||||
DF_INFO, SLICE, DF_DESCRIBE
|
||||
DF_INFO,
|
||||
SLICE,
|
||||
DF_DESCRIBE,
|
||||
VISUALIZATION_DATA
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user