Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix RIDER-70574 Unity Log does throttle on CPU due to the long log entries #2270

Merged
merged 2 commits into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ data class LogPanelItem(val time : Long,
val mode : LogEventMode,
val message : String,
val stackTrace : String,
val count: Int)
val count: Int) {

val shortPresentation: String
get() {
return message.lineSequence().firstOrNull { it.isNotEmpty() } ?: ""
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class UnityLogPanelEventRenderer : ColoredListCellRenderer<LogPanelItem>(), List
override fun customizeCellRenderer(list: JList<out LogPanelItem>, event: LogPanelItem?, index: Int, selected: Boolean, hasFocus: Boolean) {
if (event != null) {
icon = RowIcon(event.type.getIcon(), event.mode.getIcon())
val tokens = tokenizer.tokenize(event.message)
val tokens = tokenizer.tokenize(event.shortPresentation)

for (token in tokens) {
if (!token.used) {
Expand Down