Various performance improvements (#24)

* switch from array to linked list for photon queue

* performance optimizations

* fix tests

* various fixes
This commit is contained in:
Philipp Moritz
2016-11-04 00:41:20 -07:00
committed by Robert Nishihara
parent 1e2b3ceac9
commit 90a2aa4bf7
8 changed files with 130 additions and 52 deletions
+4 -1
View File
@@ -4,6 +4,8 @@
#include <stdbool.h>
#include <stdint.h>
#include "utarray.h"
enum common_message_type {
/** Disconnect a client. */
DISCONNECT_CLIENT,
@@ -21,10 +23,11 @@ int connect_ipc_sock(const char *socket_pathname);
int accept_client(int socket_fd);
/* Reading and writing data */
/* Reading and writing data. */
int write_message(int fd, int64_t type, int64_t length, uint8_t *bytes);
void read_message(int fd, int64_t *type, int64_t *length, uint8_t **bytes);
int64_t read_buffer(int fd, int64_t *type, UT_array *buffer);
void write_log_message(int fd, char *message);
void write_formatted_log_message(int fd, const char *format, ...);