Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Replacing Google Sheets as a calculation  RSS feed

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to write a class that replaces google sheets as a calculation engine.
Presently formulas and data sre passed to google sheets via API and the result returned also via API.
I would like to do all the calculations in java code in an attempt to speed up execution.

Is there a way to avoid calculating every cell sequentially which would probable be too slow.

 
Sheriff
Posts: 23714
50
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Steven Greenbaum wrote:I would like to write a class that replaces google sheets as a calculation engine.
Presently formulas and data sre passed to google sheets via API and the result returned also via API.
I would like to do all the calculations in java code in an attempt to speed up execution.



Why do you think that would speed up execution?

Is there a way to avoid calculating every cell sequentially which would probable be too slow.



Why do you think that would be too slow?

Here's what I think you might consider doing. First, write some code which replaces the Google Sheets calls by Java. For this step, don't try to write code which you think might optimize problems you think you might have. Just write ordinary code. Then see if it's actually faster than the original. (I'm assuming that the Google Sheets code is actually too slow... if it isn't, then performance isn't a reason to dump it. There might be other reasons, though, but you didn't mention any.)

If you now have code which is much slower than Google Sheets, then I'd suggest scrapping the project. Leave it the way it is. If it's faster than Sheets, and fast enough for your requirements, then go with it.

But if you're in the middle range where your code might be usable if it could be a bit faster, that's the time to optimize it. But optimizing doesn't consist of guessing at reasons why it might be slow and trying to fix them; it consists of finding parts where the code uses most of the resource you want to optimize -- in this case, run time -- and then finding ways to change those parts to improve them.
 
Saloon Keeper
Posts: 4754
117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a Java spreadsheet component called Jeppers on SourceForge. That might do the trick if you want a Java GUI.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!