• S sverchok
  • Информация о проекте
    • Информация о проекте
    • Активность
    • Метки
    • Участники
  • Репозиторий
    • Репозиторий
    • Файлы
    • Коммиты
    • Ветки
    • Теги
    • Участники
    • Диаграмма
    • Сравнение
  • Задачи 148
    • Задачи 148
    • Список
    • Доски
    • Спринты
  • Запросы на слияние 21
    • Запросы на слияние 21
  • CI/CD
    • CI/CD
    • Конвейеры
    • Задания
    • Расписания
  • Развертывания
    • Развертывания
    • Окружения
    • Релизы
  • Пакеты и реестры
    • Пакеты и реестры
    • Реестр пакетов
    • Реестр контейнеров
  • Мониторинг
    • Мониторинг
    • Инциденты
  • Аналитика
    • Аналитика
    • Поток ценности
    • CI/CD
    • Репозиторий
  • Wiki
    • Wiki
  • Сниппеты
    • Сниппеты
  • Активность
  • Диаграмма
  • Создать новую задачу
  • Задания
  • Коммиты
  • Доски с задачами
Свернуть панель
  • nikitronn
  • sverchok
  • Запросы на слияние
  • !2961

console_node line width limits

  • Ревью изменений

  • Скачать
  • Почтовые патчи
  • Простое отличие
Закрыто nikitronn запросил слияние console_node_linelimit в master Мар 12, 2020
  • Обзор 3
  • Коммиты 4
  • Конвейеры 0
  • Изменения 1

Created by: zeffii

an explanation of the current implementation:

  • The console node interprets the incoming text data, and depending on the color mode does full
  1. code tokenizing
  2. random char colors (why?.. as tests..)
  3. no color.
  • The incoming text longest line is found, and this is used to set the terminal_width. The longest line is also used to pad all shorter lines with whitespace. The new padded text is stored as a multiline string in node.terminal_text.
  • Then it makes a grid of x * y character cells, each cell is 2 triangles.
    • So for example 2 lines, of 5 chars is 10 cells, that makes a total of 20 triangles.

The issue is when you load a json of a stored sverchok layout, and the json contains a monad, the "groups" key will contain one or more very long lines (because it describes a nodetree but as a flat string ) . This will then push the longest line length to a considerable length, and as a conseqence the total amount of triangles produced by the drawing callback is going to cause considerable slow down in drawing.


the solution in this implementation is to automatically trim the longest line, the problem however is exactly what to do with that line.

  1. simply trim it and break lexing?
  2. trim it by replacing the line with a placeholder to indicate # this line is trimmed, and make it parsable as a code comment. (not breaking lexer)
  3. replace it with spaces
  4. completely skip the long line, and display a warning.
Ответственный
Назначить
Проверяющие
Запросить ревью
Оценка трудозатрат
Исходная ветка: console_node_linelimit