Code Monkey home page Code Monkey logo

pouchdb's People

Contributors

flimzy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pouchdb's Issues

Size of generated JS

You're doing great work, thank you!

I'm currently writing a Kivik driver for https://github.com/cayleygraph/cayley see: dennwc/cayley#4

Currently the tests all pass, but there is still work to do to make it practical to use. One of the issues I have come up against is the size of the generated JS.

To get the size of the generated JS for Cayley down to a reasonable level I had to remove the "net" dependency from the UUID library. Because "net" it is not used in the browser, it is redundant code. But using the "net" library inflates the size of the transpiled JS code by 673k bytes. You can see my PR to do this here: pborman/uuid#40

I believe the same issue exists for go-kivik/pouchdb and indeed for the main kivik repo, since it uses "net/http" which uses "net".

https://github.com/gopherjs/gopherjs/wiki/JavaScript-Tips-and-Gotchas says:

For making HTTP requests, don't use net/http, as importing this will also compile-in the entire TLS stack! Use GopherJS bindings to XmlHTTPRequest instead. For code that'll be compiled either to Go or JS, use a function that's constrained by build tags, so in JS it uses XHR and in Go it uses net/http.

I appreciate this is a pretty major change for both repos, which is why I have not simply raised a PR for this one to replace the reference to http.StatusNotFound in pouchdb.go with a local version of the constant, but rather chosen to raise this discussion issue.

Consider making ViewCleanup synchronous

To match functionality with CouchDB, ViewCleanup() returns immediately, which means that errors, including permissions errors, are never returned. Perhaps this should be changed; callers can use a goroutine if they don't want to block.

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.