#11 Cleaning redis service and adding ttl getter method

Integração executada
jonathan integrou 4 cometimentos de %!<(string=kris/refactor_redis_service)/code> em master há 4 anos
kris comentado há 4 anos
Ainda não há conteúdo.
kris mudou o título de WIP: (testing) Cleaning redis service para Cleaning redis service adn adding ttl getter method há 4 anos
kris comentado há 4 anos
Autor

@jonathan please review

@jonathan please review
jonathan foi atribuída por kris há 4 anos
kris mudou o título de Cleaning redis service adn adding ttl getter method para Cleaning redis service and adding ttl getter method há 4 anos
jonathan comentado há 4 anos
Proprietário(a)

@kris -- Things that make me wary:

  • use of var in a low-level library. The lower you go, the more explicit types should be. Why introduce another potential source of errors? Can we remove var and replace with class names?
  • use of streams/lambdas/collecting and in general anywhere we are now creating new objects when we could have avoided it. low level libraries should generally prefer for-loops and static classes. Can you review and avoid using stream methods and allocating new objects where possible?

Please give me a heads-up in advance before refactoring more library code. With the above changes I will merge this, but frankly I don’t see a big benefit given the risk. If we had more comprehensive test coverage I would feel better about the risk.

@kris -- Things that make me wary: * use of `var` in a low-level library. The lower you go, the more explicit types should be. Why introduce another potential source of errors? Can we remove `var` and replace with class names? * use of streams/lambdas/collecting and in general anywhere we are now creating new objects when we could have avoided it. low level libraries should generally prefer for-loops and static classes. Can you review and avoid using stream methods and allocating new objects where possible? Please give me a heads-up in advance before refactoring more library code. With the above changes I will merge this, but frankly I don't see a big benefit given the risk. If we had more comprehensive test coverage I would feel better about the risk.
kris comentado há 4 anos
Autor
  • Removing var (only String was replaced in 5ish places, so it was easy) - agree, sorry
  • stream/lambda/collect is used just in 1 place - method prefix(Collection<String>). In master (current version) following is used transform(keys, o -> prefix(o.toString())) - so lambda is there also. I did some perfomance test on this, and the new solution worked 2x faster at least on collections with 10.000 Strings. Please confirm you really want apache’s transform method back. Or maybe to just change all this and use plain for loop with another collection created as output?
- Removing var (only String was replaced in 5ish places, so it was easy) - agree, sorry - stream/lambda/collect is used just in 1 place - method `prefix(Collection<String>)`. In master (current version) following is used `transform(keys, o -> prefix(o.toString()))` - so lambda is there also. I did some perfomance test on this, and the new solution worked 2x faster at least on collections with 10.000 Strings. Please confirm you really want apache's transform method back. Or maybe to just change all this and use plain for loop with another collection created as output?
jonathan fechou este pedido de integração há 4 anos
jonathan eliminou o ramo kris/refactor_redis_service há 4 anos
A integração constante no pedido foi executada como 5d199cbd98.
Inicie a sessão para participar neste diálogo.
Sem revisores
Sem etiquetas
Sem etapa
Sem responsáveis
2 Participantes
Notificações
Date limite

Sem data limite definida.

Dependências

Este pedido de integração não tem quaisquer dependências, neste momento.

Carregando…
Ainda não há conteúdo.