Closed Bug 1173802 Opened 11 years ago Closed 10 years ago

Improve NFC I/O code

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox42 fixed)

RESOLVED FIXED
FxOS-S4 (07Aug)
Tracking Status
firefox42 --- fixed

People

(Reporter: tzimmermann, Assigned: tzimmermann)

References

Details

Attachments

(5 files, 5 obsolete files)

12.35 KB, patch
tzimmermann
: review+
Details | Diff | Splinter Review
15.98 KB, patch
tzimmermann
: review+
Details | Diff | Splinter Review
8.98 KB, patch
tzimmermann
: review+
Details | Diff | Splinter Review
6.69 KB, patch
tzimmermann
: review+
Details | Diff | Splinter Review
1.34 KB, patch
tzimmermann
: review+
Details | Diff | Splinter Review
NFC messages are send and received on the I/O thread, processed on the NFC thread, and the actual DOM code runs on the main thread. Messages passing between these threads are often send via the main thread, even though main only forwards to the next thread. The NFC I/O code can be made cleaner and faster by exchanging messages directly between NFC thread and I/O thread, and removing the extra hop through main. See also a similar improvement for RIL in bug 1171994
Attachment #8621480 - Flags: review?(allstars.chh)
Attachment #8621482 - Flags: review?(allstars.chh)
Hi Yoshi, I know you have a tight schedule, but the patch set isn't urgent. Take your time with the review.
Thanks, I'll be quite busy recently, so I expect to review these after work week. i.e. in July.
Comment on attachment 8621479 [details] [diff] [review] [01] Bug 1173802: Move NFC socket and messaging code into |NfcConsumer| Review of attachment 8621479 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/nfc/gonk/NfcService.cpp @@ +16,4 @@ > #include "mozilla/ipc/NfcConnector.h" > +#include "mozilla/ipc/StreamSocket.h" > +#include "mozilla/ipc/StreamSocketConsumer.h" > +#include "mozilla/ModuleUtils.h" Are you trying yo sort this alphabetically ? If yes then this should be moved to after mozilla/ClearOnShutdown.h @@ +20,3 @@ > #include "mozilla/unused.h" > +#include "NfcMessageHandler.h" > +#include "NfcOptions.h" ditto @@ +434,5 @@ > + MOZ_ASSERT(NS_IsMainThread()); > + > + switch (aIndex) { > + case LISTEN_SOCKET: { > + nsCString value("nfcd:-a "); indent, should be 2 spaces.
Attachment #8621479 - Flags: review?(allstars.chh) → review+
Attachment #8621480 - Flags: review?(allstars.chh) → review+
Attachment #8621482 - Flags: review?(allstars.chh) → review+
Attachment #8621484 - Flags: review?(allstars.chh) → review+
Attachment #8621485 - Flags: review?(allstars.chh) → review+
> > #include "mozilla/ipc/NfcConnector.h" > > +#include "mozilla/ipc/StreamSocket.h" > > +#include "mozilla/ipc/StreamSocketConsumer.h" > > +#include "mozilla/ModuleUtils.h" > > Are you trying yo sort this alphabetically ? > If yes then this should be moved to after mozilla/ClearOnShutdown.h It comes after mozilla/ClearOnShutdown. (?) > > @@ +434,5 @@ > > + MOZ_ASSERT(NS_IsMainThread()); > > + > > + switch (aIndex) { > > + case LISTEN_SOCKET: { > > + nsCString value("nfcd:-a "); > > indent, should be 2 spaces. OK.
Comment on attachment 8621479 [details] [diff] [review] [01] Bug 1173802: Move NFC socket and messaging code into |NfcConsumer| Review of attachment 8621479 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/nfc/gonk/NfcService.cpp @@ +16,4 @@ > #include "mozilla/ipc/NfcConnector.h" > +#include "mozilla/ipc/StreamSocket.h" > +#include "mozilla/ipc/StreamSocketConsumer.h" > +#include "mozilla/ModuleUtils.h" Sorry I mean #include "mozilla/ModuleUtils.h" should be moved to line 11.
I still don't get it. 'd' and 'i' come before 'm'. AFAICT the coding style doesn't require treating directories differently.
(In reply to Thomas Zimmermann [:tzimmermann] [:tdz] from comment #11) > I still don't get it. 'd' and 'i' come before 'm'. AFAICT the coding style > doesn't require treating directories differently. okay then fine by me I thought we sort it by ascii code.
Changes since v1: - rebased onto m-c - fixed coding style according to review
Attachment #8621479 - Attachment is obsolete: true
Attachment #8641553 - Flags: review+
Changes since v1: - rebased onto m-c
Attachment #8621480 - Attachment is obsolete: true
Attachment #8641554 - Flags: review+
Changes since v1: - rebased onto m-c
Attachment #8621482 - Attachment is obsolete: true
Attachment #8641555 - Flags: review+
Changes since v1: - rebased onto m-c
Attachment #8621484 - Attachment is obsolete: true
Attachment #8641556 - Flags: review+
Changes since v1: - rebased onto m-c
Attachment #8621485 - Attachment is obsolete: true
Attachment #8641557 - Flags: review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: