Code Monkey home page Code Monkey logo

Comments (9)

springmeyer avatar springmeyer commented on July 17, 2024 1

any gotchas we should be aware of either about switching those to 6, or dropping 4 more generally?

No gochas, feel free to move the build. Should work fine. Also, would appreciate a PR at https://github.com/mapbox/node-cpp-skel doing the same thing (since we should move to v6 as default there given the EOL of 2018-04-30 mentioned at https://github.com/nodejs/Release#release-schedule)

from carmen-cache.

yhahn avatar yhahn commented on July 17, 2024

👍 to this plan

from carmen-cache.

aaaandrea avatar aaaandrea commented on July 17, 2024

Finished divvying up functions into individual files, and associated headers. The only class that is not represented in a header is the UInt32Comparator which is created in normalizationcache.cpp. We chose to leave this off since it is only used in the normalization cache, and was fairly redundant to have in the normalizationcache.hpp file as well.

from carmen-cache.

apendleton avatar apendleton commented on July 17, 2024

This week we completed the work of splitting up the codebase into more manageable pieces, and have started working on docs, which we hope to have done early next week. We've also decided not to pursue a more direct adaptation of the benchmark work from core-tech, as it seems mostly to be geared towards runtime configurability for which we don't have any real usecase -- we do already benchmark have benchmarks in place for our performance-sensitive code, following the X.bench.js naming pattern in our test directory.

As such, the main remaining items after docs will be some Travis config tweaks (again per core-tech's recommendation), and a reorganization of carmen-cache's tests. We expect to be able to complete these by the end of next week.

Once this is all done and after team review we'll want to cut a release that we can push upstream to carmen, etc.. We'll determine timing on upstream PRs in coordination with the respective refactor teams.

from carmen-cache.

apendleton avatar apendleton commented on July 17, 2024

@springmeyer quick question when you get a sec: we're standardizing geocoding-team-wide on node 6+, so we were thinking about dropping node 4 from our build matrix. The ASAN/debug build and the GCC build only run on 4 at the moment; any gotchas we should be aware of either about switching those to 6, or dropping 4 more generally?

from carmen-cache.

apendleton avatar apendleton commented on July 17, 2024

@springmeyer moving the conversation about bench tweaks back here just for geocoding team discoverability and to not muddy up the process ticket, but just to make it concrete, here's what I'm thinking as a first pass at benchmark tweaks:

  • move test/*.bench.test.js (of which I guess there's just one right now) into a new /bench directory
  • adjust the test runners to still run the benches in this new directory to ensure that they don't break
  • remove timing assertions
  • remove skipping of bench or changes of bench behavior for particular test modes (DEBUG, ASAN)
  • add a note to CONTRIBUTING.md recommending that contributors manually run benchmarks to compare a new branch and master to avoid performance regressions

I think, just given the wider team's timeboxing of the respective refactor groups' projects to the end of this week, we'd hold off on either writing additional benchmarks of more functionality, or significantly augmenting the current benchmarks with more robust/representative test data, but would ticket those out as things to come back to in a subsequent pass.

Does that sound good to you?

from carmen-cache.

springmeyer avatar springmeyer commented on July 17, 2024

Great plan @apendleton - sounds good 👍

from carmen-cache.

apendleton avatar apendleton commented on July 17, 2024

@boblannon and @aarthykc we're done with our checklist and are passing tests both here and in carmen so #116 should be good for your review.

A couple notes:

  • C++ functions callable from Node have a different signature in C++ terms than in JS terms: from C++, they take one argument (called info) and return nothing; they access the JS args and set the JS return value by calling methods on info. We used JSDoc, but decided to stick with JS conventions, so, params and return type are as they appear from JS, and functions not directly callable from JS don't have JSDoc declarations. For most internal functions, though, we did add non-JSDoc-formatted comments explaining what each does.
  • Our refactor separated out common utility functions into two different files, one for utilities that depend on the Node ecosystem and one for pure-C++ functions that don't. The rationale there was to eventually make it possible to unit test the latter flavor directly in C++ rather than indirectly via integration tests called from JS. There are almost no functions that actually fit this criterion right now, though, and the ones we have have pretty trivial functionality, so it wasn't worth bolting on a second unit-testing framework just yet. What we've done so far is, I guess, the start of that reorganization, and we'll think about factoring more pure-C++ logic out of the Node-flavored code, and testing it explicitly, as part of future work.

from carmen-cache.

apendleton avatar apendleton commented on July 17, 2024

This is done in #116

from carmen-cache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.