Improve struct dictionary codecs in Go

Abierto
#153 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
go
Área
performance

Línea de trabajo

Start by reviewing the Go struct and dictionary codec implementation and the initial experiment in the linked profileserialize branch. Work through the unchecked Tree-to-hashmap item alongside the completed freezing, pointer-reference, CopyFrom, and refNum goals. Done means the remaining dictionary-encoded struct copying is reduced without breaking the listed behaviors.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Go

We do a lot of unnecessary copying and cloning of dictionary-encoded structs currently, especially during encoding.

Consider the following:

  • Allow marking structs frozen. Once frozen they can be safely referenced by pointer from multiple places (including dictionaries) without cloning.
  • Use freezing after record is read.
  • Allowing referencing frozen structs from read operations directly in write operations. Should improve copying (read/write).
  • Make CopyFrom smarter, avoid cloning frozen structs, just copy the pointer.
  • Encourage Freeze() when creating data (not from Read()) of Writer. Should improve encoding.
  • Cache refNum in the object to avoid slow Tree lookups.
  • Replace Tree by Hashmap. Cache the hashcode, invalidate on modifications.
  • Allowing setting dictionary structs in their containing structs by pointer instead of requiring full CopyFrom or field-by-field setting.

Most of these can be applied to varying degrees both to Go and Java. This summary issue is for Go. Duplicate it for Java.

See some initial experiment on this branch https://github.com/splunk/stef/compare/main...tigran/profileserialize?expand=1

Lenguaje dominante
Java
Estrellas
12
Forks
6
Merge medio
4 h 45 min
PR fusionados (30 d)
9

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de splunk/stef

Todos los issues de splunk/stef

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.