SlideShare una empresa de Scribd logo
1 de 27
Life after Calc Core 
Change 
Kohei Yoshida <kohei.yoshida@collabora.com>
Topics 
• What change was made in Calc core. 
• Affected areas. 
• Expectation vs reality. 
• Going forward.
What change was made in Calc core. 
https://libreoffice-from-collabora.com
ScDocument 
Old model 
ScTable 
ScColumn 
ScValueCell 
ScBaseCell 
Broadcaster (8 bytes) 
ScFormulaCell 
Text width (2 bytes) 
Cell type (1 byte) 
Script type (1 byte) 
ScStringCell ScEditCell 
ScNoteCell*
New model 
ScDocument 
ScTable 
mdds::multi_type_vector 
svl::SharedString block 
double block 
EditTextObject block 
ScFormulaCell block 
ScColumn 
Broadcaster 
Text width 
Script type 
Cell value
Iterating over cells (old way)
Iterating over cells (new way)
Before shared formula 
ScFormulaCell ScTokenArray 
ScFormulaCell ScTokenArray 
ScFormulaCell ScTokenArray 
ScFormulaCell ScTokenArray 
ScFormulaCell ScTokenArray 
ScFormulaCell ScTokenArray 
ScFormulaCell ScTokenArray
After shared formula 
ScFormulaCell 
ScTokenArray 
ScFormulaCell 
ScFormulaCell 
ScFormulaCell 
ScFormulaCell 
ScFormulaCell 
ScFormulaCell 
ScFormulaCellGroup
Shared string concept 
svl::SharedStringPool 
svl::SharedString 
Original string pool 
Upcased string pool 
svl::SharedString 
svl::SharedString
String comparison (old way)
String comparison (new way)
Bottom line... 
● Largest refactoring effort in Calc code. 
● Most critical parts of Calc code have 
changed. 
● Shared formula - ScFormulaCell no 
longer owns ScTokenArray at all times. 
● Shared string - all string objects need to 
be pooled. 
● Random access to cell array is no longer 
O(1).
Affected areas 
https://libreoffice-from-collabora.com
Calc 
95 %Non-scientific estimate 
Affected by core change
What features are affected? 
Undo / Redo 
Formula Dependency Reference Updates Copy & Paste 
Sorting ODS Import / Export 
Excel Import / Export Named Range 
Content Rendering 
Find & Replace 
Cell Comment 
Cell Editing 
Database Range 
Live Spellcheck 
VBA API Layer 
UNO API Layer 
SYLK Import / Export 
DBF Import / Export 
CppUnit Test 
RTF Import Quattro Pro Import 
HTML Import / Export 
External Reference 
DIF Import / Export 
Change Tracking 
CSV Import / Export 
Conditional Formatting 
Chart Data Provider 
Cell Validation 
Formula Calculation 
Formula Tokenization Case Conversion 
Autofilter ...
Expectation vs Reality 
https://libreoffice-from-collabora.com
Check #1 
20 to 50% of the code change 
would cause regressions. 
Almost all code changes caused 
regressions in some form. Some did 
more than others.
Check #2 
The worst part is behind us. We just 
need to fix trivial bugs. 
The worst part was yet to come. 
Lots of medium-to-large follow-up 
refactoring ensued.
Check #3 
Just focus on regressions during 
the 4.2 releases, and go back to 
normal for the 4.3. 
We did fix the worst ones in the 4.2 
cycle. But many still remain.
Check #4 
We already wrote a lot of unit tests 
for Calc core prior to the change. 
They should keep us safe. 
We ended up doubling the amount 
of unit tests for Calc during the 4.2 
period. We still don’t have enough.
Check #5 
As a responsible coder, I will fix all 
the bugs my change caused. 
Calc’s core is too large for one 
coder to handle. We need multiple 
people who can handle bugs in 
Calc core.
Going forward 
https://libreoffice-from-collabora.com
Challenges we face 
● Squash remainder of regressions caused 
by the core change. The number still too 
high. 
● Gather more people becoming 
comfortable handling bug fixes in Calc 
core. 
● Build the culture of writing unit test for 
each and every bug fix.
Unit test is key 
● One unit test is worth 20 future bug 
fixes. 
● A bug fix does not finish until you 
write a test. 
● Writing unit test is courtesy for your 
fellow developers. 
● We really don’t have a choice.
Unit test is key (repeated) 
● A bug fix without a unit test WILL GET 
BROKEN AGAIN in the next release. 
● A bug fix with a unit test WILL 
REMAIN FIXED FOREVER. 
Which one will be 
your choice?
THANKS! 
https://libreoffice-from-collabora.com

Más contenido relacionado

La actualidad más candente

Java Chapter 05 - Conditions & Loops: part 2
Java Chapter 05 - Conditions & Loops: part 2Java Chapter 05 - Conditions & Loops: part 2
Java Chapter 05 - Conditions & Loops: part 2
DanWooster1
 
Java Chapter 05 - Conditions & Loops: part 6
Java Chapter 05 - Conditions & Loops: part 6Java Chapter 05 - Conditions & Loops: part 6
Java Chapter 05 - Conditions & Loops: part 6
DanWooster1
 
Converting LotusScript Agents to Java Agents
Converting LotusScript Agents to Java AgentsConverting LotusScript Agents to Java Agents
Converting LotusScript Agents to Java Agents
dominion
 

La actualidad más candente (20)

Build pipelines with TeamCity
Build pipelines with TeamCityBuild pipelines with TeamCity
Build pipelines with TeamCity
 
Patterns in JavaScript
Patterns in JavaScriptPatterns in JavaScript
Patterns in JavaScript
 
Java Chapter 05 - Conditions & Loops: part 2
Java Chapter 05 - Conditions & Loops: part 2Java Chapter 05 - Conditions & Loops: part 2
Java Chapter 05 - Conditions & Loops: part 2
 
Java Chapter 05 - Conditions & Loops: part 6
Java Chapter 05 - Conditions & Loops: part 6Java Chapter 05 - Conditions & Loops: part 6
Java Chapter 05 - Conditions & Loops: part 6
 
Angular Libraries & NPM
 Angular Libraries & NPM Angular Libraries & NPM
Angular Libraries & NPM
 
TDD For Mortals
TDD For MortalsTDD For Mortals
TDD For Mortals
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Java Batch
Java BatchJava Batch
Java Batch
 
Testing Alfresco extensions
Testing Alfresco extensionsTesting Alfresco extensions
Testing Alfresco extensions
 
Pluggable Pipelines
Pluggable PipelinesPluggable Pipelines
Pluggable Pipelines
 
A Report on Web Application Framework Benchmarks and Perl's Performance
A Report on Web Application Framework Benchmarks and Perl's PerformanceA Report on Web Application Framework Benchmarks and Perl's Performance
A Report on Web Application Framework Benchmarks and Perl's Performance
 
Converting LotusScript Agents to Java Agents
Converting LotusScript Agents to Java AgentsConverting LotusScript Agents to Java Agents
Converting LotusScript Agents to Java Agents
 
Asynchronous Programming in C# - Part 1
Asynchronous Programming in C# - Part 1Asynchronous Programming in C# - Part 1
Asynchronous Programming in C# - Part 1
 
Specs2 3.0
Specs2 3.0Specs2 3.0
Specs2 3.0
 
Specs2 3.4
Specs2 3.4Specs2 3.4
Specs2 3.4
 
Qtp quiz for you
Qtp quiz for youQtp quiz for you
Qtp quiz for you
 
RoelTyper
RoelTyperRoelTyper
RoelTyper
 
Automated testing of ASP .Net Core applications
Automated testing of ASP .Net Core applications Automated testing of ASP .Net Core applications
Automated testing of ASP .Net Core applications
 
Asynchronous javascript
 Asynchronous javascript Asynchronous javascript
Asynchronous javascript
 
Tips for migration from swift 2.2 to swift 3.0
Tips for migration from swift 2.2 to swift 3.0Tips for migration from swift 2.2 to swift 3.0
Tips for migration from swift 2.2 to swift 3.0
 

Destacado (10)

Evaluating research consortium
Evaluating research consortiumEvaluating research consortium
Evaluating research consortium
 
Lefleat kenakalan remaja
Lefleat kenakalan remajaLefleat kenakalan remaja
Lefleat kenakalan remaja
 
RBC Industrials Conference
RBC Industrials ConferenceRBC Industrials Conference
RBC Industrials Conference
 
Primer informe aciuaa 2014 Mesa Directiva 2013-2016
Primer informe aciuaa 2014 Mesa Directiva 2013-2016Primer informe aciuaa 2014 Mesa Directiva 2013-2016
Primer informe aciuaa 2014 Mesa Directiva 2013-2016
 
Autoevaluación
AutoevaluaciónAutoevaluación
Autoevaluación
 
Plantilla cpe 2014 v 03
Plantilla cpe 2014 v 03Plantilla cpe 2014 v 03
Plantilla cpe 2014 v 03
 
Epistemologia
EpistemologiaEpistemologia
Epistemologia
 
Evolución de la literatura hispanoamericana
Evolución de la literatura hispanoamericanaEvolución de la literatura hispanoamericana
Evolución de la literatura hispanoamericana
 
PAE paciente con flebitis
PAE paciente con flebitisPAE paciente con flebitis
PAE paciente con flebitis
 
Campos de la Psicologia
Campos de la PsicologiaCampos de la Psicologia
Campos de la Psicologia
 

Similar a Life after Calc core change

Migrating From Cpp To C Sharp
Migrating From Cpp To C SharpMigrating From Cpp To C Sharp
Migrating From Cpp To C Sharp
Ganesh Samarthyam
 
RedisConf18 - Implementing a New Data Structure for Redis
RedisConf18 - Implementing a New Data Structure for Redis  RedisConf18 - Implementing a New Data Structure for Redis
RedisConf18 - Implementing a New Data Structure for Redis
Redis Labs
 
A tale of bug prediction in software development
A tale of bug prediction in software developmentA tale of bug prediction in software development
A tale of bug prediction in software development
Martin Pinzger
 
JAVA in Artificial intelligent
JAVA in Artificial intelligentJAVA in Artificial intelligent
JAVA in Artificial intelligent
Virat Andodariya
 

Similar a Life after Calc core change (20)

Agile analysis development
Agile analysis developmentAgile analysis development
Agile analysis development
 
The Three Horse Race
The Three Horse RaceThe Three Horse Race
The Three Horse Race
 
Scalax
ScalaxScalax
Scalax
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
 
Migrating From Cpp To C Sharp
Migrating From Cpp To C SharpMigrating From Cpp To C Sharp
Migrating From Cpp To C Sharp
 
RedisConf18 - Implementing a New Data Structure for Redis
RedisConf18 - Implementing a New Data Structure for Redis  RedisConf18 - Implementing a New Data Structure for Redis
RedisConf18 - Implementing a New Data Structure for Redis
 
Is It Fast? : Measuring MongoDB Performance
Is It Fast? : Measuring MongoDB PerformanceIs It Fast? : Measuring MongoDB Performance
Is It Fast? : Measuring MongoDB Performance
 
Advanced web application architecture Way2Web
Advanced web application architecture Way2WebAdvanced web application architecture Way2Web
Advanced web application architecture Way2Web
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Improving Code Quality Through Effective Review Process
Improving Code Quality Through Effective  Review ProcessImproving Code Quality Through Effective  Review Process
Improving Code Quality Through Effective Review Process
 
5 hs mpostcustomizationrenefonseca
5 hs mpostcustomizationrenefonseca5 hs mpostcustomizationrenefonseca
5 hs mpostcustomizationrenefonseca
 
C++ Tail Recursion Using 64-bit variables
C++ Tail Recursion Using 64-bit variablesC++ Tail Recursion Using 64-bit variables
C++ Tail Recursion Using 64-bit variables
 
A tale of bug prediction in software development
A tale of bug prediction in software developmentA tale of bug prediction in software development
A tale of bug prediction in software development
 
java in Aartificial intelligent by virat andodariya
java in Aartificial intelligent by virat andodariyajava in Aartificial intelligent by virat andodariya
java in Aartificial intelligent by virat andodariya
 
JAVA in Artificial intelligent
JAVA in Artificial intelligentJAVA in Artificial intelligent
JAVA in Artificial intelligent
 
Nikolai Boiko "NodeJS Refactoring: How to kill a Dragon and stay alive"
Nikolai Boiko "NodeJS Refactoring: How to kill a Dragon and stay alive"Nikolai Boiko "NodeJS Refactoring: How to kill a Dragon and stay alive"
Nikolai Boiko "NodeJS Refactoring: How to kill a Dragon and stay alive"
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Life after Calc core change

  • 1. Life after Calc Core Change Kohei Yoshida <kohei.yoshida@collabora.com>
  • 2. Topics • What change was made in Calc core. • Affected areas. • Expectation vs reality. • Going forward.
  • 3. What change was made in Calc core. https://libreoffice-from-collabora.com
  • 4. ScDocument Old model ScTable ScColumn ScValueCell ScBaseCell Broadcaster (8 bytes) ScFormulaCell Text width (2 bytes) Cell type (1 byte) Script type (1 byte) ScStringCell ScEditCell ScNoteCell*
  • 5. New model ScDocument ScTable mdds::multi_type_vector svl::SharedString block double block EditTextObject block ScFormulaCell block ScColumn Broadcaster Text width Script type Cell value
  • 8. Before shared formula ScFormulaCell ScTokenArray ScFormulaCell ScTokenArray ScFormulaCell ScTokenArray ScFormulaCell ScTokenArray ScFormulaCell ScTokenArray ScFormulaCell ScTokenArray ScFormulaCell ScTokenArray
  • 9. After shared formula ScFormulaCell ScTokenArray ScFormulaCell ScFormulaCell ScFormulaCell ScFormulaCell ScFormulaCell ScFormulaCell ScFormulaCellGroup
  • 10. Shared string concept svl::SharedStringPool svl::SharedString Original string pool Upcased string pool svl::SharedString svl::SharedString
  • 13. Bottom line... ● Largest refactoring effort in Calc code. ● Most critical parts of Calc code have changed. ● Shared formula - ScFormulaCell no longer owns ScTokenArray at all times. ● Shared string - all string objects need to be pooled. ● Random access to cell array is no longer O(1).
  • 15. Calc 95 %Non-scientific estimate Affected by core change
  • 16. What features are affected? Undo / Redo Formula Dependency Reference Updates Copy & Paste Sorting ODS Import / Export Excel Import / Export Named Range Content Rendering Find & Replace Cell Comment Cell Editing Database Range Live Spellcheck VBA API Layer UNO API Layer SYLK Import / Export DBF Import / Export CppUnit Test RTF Import Quattro Pro Import HTML Import / Export External Reference DIF Import / Export Change Tracking CSV Import / Export Conditional Formatting Chart Data Provider Cell Validation Formula Calculation Formula Tokenization Case Conversion Autofilter ...
  • 17. Expectation vs Reality https://libreoffice-from-collabora.com
  • 18. Check #1 20 to 50% of the code change would cause regressions. Almost all code changes caused regressions in some form. Some did more than others.
  • 19. Check #2 The worst part is behind us. We just need to fix trivial bugs. The worst part was yet to come. Lots of medium-to-large follow-up refactoring ensued.
  • 20. Check #3 Just focus on regressions during the 4.2 releases, and go back to normal for the 4.3. We did fix the worst ones in the 4.2 cycle. But many still remain.
  • 21. Check #4 We already wrote a lot of unit tests for Calc core prior to the change. They should keep us safe. We ended up doubling the amount of unit tests for Calc during the 4.2 period. We still don’t have enough.
  • 22. Check #5 As a responsible coder, I will fix all the bugs my change caused. Calc’s core is too large for one coder to handle. We need multiple people who can handle bugs in Calc core.
  • 24. Challenges we face ● Squash remainder of regressions caused by the core change. The number still too high. ● Gather more people becoming comfortable handling bug fixes in Calc core. ● Build the culture of writing unit test for each and every bug fix.
  • 25. Unit test is key ● One unit test is worth 20 future bug fixes. ● A bug fix does not finish until you write a test. ● Writing unit test is courtesy for your fellow developers. ● We really don’t have a choice.
  • 26. Unit test is key (repeated) ● A bug fix without a unit test WILL GET BROKEN AGAIN in the next release. ● A bug fix with a unit test WILL REMAIN FIXED FOREVER. Which one will be your choice?

Notas del editor

  1. Sorting performance Named range update. Database range update. Broken formula dependency tracking.
  2. Some code needs refactoring to become unit-testable.
  3. Some bugs require a re-design which may take 1 week or more. Consultancy duty &amp; customer bugs take priority.
  4. “We really don’t have a choice.” - We don’t have huge QA dedicating to go through every code change or long release cycle devoted to ironing out bugs.