Coder Social home page Coder Social logo

qwik-city-content's People

Contributors

nnelgxorz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

priestch

qwik-city-content's Issues

Consider removing Serde as a dependency

Currently, we use Serde to deserialize yaml and to serialize JSON.

Because we perform manipulations on the Page struct, it may be an unnecessary allocation. Further, if we replace the yaml deserialization with a custom option tailored to our use case, Serde could be completely dropped as dependency.

This would reduce the size of our binaries and likely result in performance boosts.

Feat: Type overrides

Investigate if there is way to override the type for RouteParams with the generated type, removing the need to import and cast route params.

No more of this, for example:

import {RouteParams} from './generated'

export default component$(() => {
  const params = useLocation().params as RouteParams;
 //...
})

Better yaml handling

Currently we use serde to deserialze yaml. It deserializes into a BTreeMap which is not an ideal data structure. Serde_yaml also doesn't support zero copy deserialization, so we are allocating anytime we deserialize.

Ideally, we can parse yaml into a flat data structure and only reference the &str source, without copying/allocating anything.

This is something that must be done for every content page, so it would be a big win for performance.

Performance Analysis

Once MVP features are stable, begin performance profiling with an eye toward:

  • Getting data into CPU caches
  • Removing allocations
  • Improving algorithms

Add draft content

Allow users to mark content as a draft using draft: true to remove a piece of content from the output.

Manually generate collection types

Using the Merge helper type is a cool trick, but Typescript starts to choke on larger collections.

Ideally, we can generate types for each collection manually to prevent any bottlenecks on larger content collections.

Better Error handling

Currently our error handling is very sloppy. Ideally, we would have our own Error enum and the ability to early return using ? from functions instead of checking for errors and console logging them.

Investigate MDX options

Currently, for simplicity, we just support markdown and output a single html string. This will not work for mdx that imports Qwik components.

Investigate options for the optimal pre-processing.

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.