42School / norminette

Official 42 norminette
MIT License
944 stars 139 forks source link

Too slow on large files #341

Closed mjy9088 closed 1 year ago

mjy9088 commented 2 years ago

Describe the bug

norminette is toooooooo slow on large file

Erroneous code

/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ps_hardcoded_tot_7.c                               :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: Juyeong Maing <jmaing@student.42seoul.kr>  +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2022/07/10 09:25:31 by                   #+#    #+#             */
/*   Updated: 2022/07/10 09:26:38 by Juyeong Maing    ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include <stddef.h>

static const size_t g_ps_hardcoded_tot_7_distance = 16;
static const char   *g_ps_hardcoded_tot_7[] = {
    "\2\10\2\10\2\7\2\2\4\13\2\13\2\12",
    "\2\10\2\10\2\7\2\2\13\2\13\2\12",
    "\2\10\2\10\2\2\7\2\4\13\2\13\2\12",
// ...
// 7! lines of string literal
// ...
    "\2\2\2\2\2\2\4\2",
    "\2\2\2\2\2\2\2\4",
    "\2\2\2\2\2\2\2",
};

void    ps_hardcoded_tot_7(
    const char *const **out_ptr,
    size_t *out_distance
)
{
    *out_ptr = g_ps_hardcoded_tot_7;
    *out_distance = g_ps_hardcoded_tot_7_distance;
}

Additional infos

Additional context

There's 19 files which is 8x larger than code above in my repo, I can't wait norminette during peer evaluation

mjy9088 commented 1 year ago

Has this issue been resolved?

matthieu42Network commented 1 year ago

No, and we won't resolve it, the norminette is not made for this kind of configuration.